#NEWLINE# def _compute_req_per_sec( self , stat_dict ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# sd_start = stat_dict [ 'start' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# stat_dict [ 'avg_req_per_sec' ] = 0.0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# delta_t = ( stat_dict [ 'stop' ] - sd_start ) #NEWLINE# if ( self != 0 ) : #NEWLINE# #INDENT# stat_dict [ 'avg_req_per_sec' ] = round ( ( stat_dict [ 'req_count' ] / delta_t ) , 6 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# stat_dict [ 'avg_req_per_sec' ] = float ( 'inf' )