示例#1
0
文件: status.py 项目: R41nB0W/w3af
    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)
示例#2
0
    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)
示例#3
0
 def _get_counter( self ):
     '''
     @return: The current counter number to assign as the id for responses.
     '''
     return consecutive_number_generator.get()
示例#4
0
 def _get_counter(self):
     '''
     :return: The current counter number to assign as the id for responses.
     '''
     return core_num_gen.get()
示例#5
0
 def _get_counter(self):
     '''
     @return: The current counter number to assign as the id for responses.
     '''
     return core_num_gen.get()