def get_rpm(self): """ :return: The number of HTTP requests per minute performed since the start of the scan. """ if self._start_time_epoch is None: raise RuntimeError("Can NOT call get_run_time before start().") now = time.time() diff = now - self._start_time_epoch run_time = diff / 60.0 return int(consecutive_number_generator.get() / run_time)
def get_rpm(self): ''' :return: The number of HTTP requests per minute performed since the start of the scan. ''' if self._start_time_epoch is None: raise RuntimeError('Can NOT call get_run_time before start().') now = time.time() diff = now - self._start_time_epoch run_time = diff / 60.0 return int(consecutive_number_generator.get() / run_time)
def _get_counter( self ): ''' @return: The current counter number to assign as the id for responses. ''' return consecutive_number_generator.get()
def _get_counter(self): ''' :return: The current counter number to assign as the id for responses. ''' return core_num_gen.get()
def _get_counter(self): ''' @return: The current counter number to assign as the id for responses. ''' return core_num_gen.get()