#NEWLINE# def test_calculate_scenario_stats_create( self ) : #NEWLINE# #INDENT# c_first_byte_latency = [ 1 , 1.2 , 0.1 ] #NEWLINE# c_last_byte_latency = [ 3.0 , 2.2 , 0.2 ] #NEWLINE# self . assertDictEqual ( dict ( start = 100.0 , stop = 106.0 , req_count = 3 , retries = 1 , retry_rate = 33.333333 , errors = 0 , avg_req_per_sec = round ( ( 3 / ( 106 - 100.0 ) ) , 6 ) , first_byte_latency = dict ( min = ( '%6.3f' % min ( c_first_byte_latency ) ) , max = ( '%7.3f' % max ( c_first_byte_latency ) ) , pctile = ( '%7.3f' % max ( c_first_byte_latency ) ) , avg = ( '%7.3f' % ssbench . util . mean ( c_first_byte_latency ) ) , std_dev = ( '%7.3f' % ssbench . util . uncorrected_stdev ( c_first_byte_latency ) ) , median = ( '%7.3f' % ssbench . util . median ( c_first_byte_latency ) ) ) , last_byte_latency = dict ( min = ( '%6.3f' % min ( c_last_byte_latency ) ) , max = ( '%7.3f' % max ( c_last_byte_latency ) ) , pctile = ( '%7.3f' % max ( c_last_byte_latency ) ) , avg = ( '%7.3f' % ssbench . util . mean ( c_last_byte_latency ) ) , std_dev = ( '%7.3f' % ssbench . util . uncorrected_stdev ( c_last_byte_latency ) ) , median = ( '%7.3f' % ssbench . util . median ( c_last_byte_latency ) ) ) , worst_first_byte_latency = ( max ( c_first_byte_latency ) , 'txID004' ) , worst_last_byte_latency = ( max ( c_last_byte_latency ) , 'txID002' ) , size_stats = OrderedDict ( [ ( 'tiny' , { #NEWLINE# #INDENT# 'avg_req_per_sec' : 5.0 , #NEWLINE# 'first_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 0.1 ) , #NEWLINE# 'max' : ( '%7.3f' % 0.1 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 0.1 ) , #NEWLINE# 'median' : ( '%7.3f' % 0.1 ) , #NEWLINE# 'min' : ( '%6.3f' % 0.1 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'last_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 0.2 ) , #NEWLINE# 'max' : ( '%7.3f' % 0.2 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 0.2 ) , #NEWLINE# 'median' : ( '%7.3f' % 0.2 ) , #NEWLINE# 'min' : ( '%6.3f' % 0.2 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'worst_first_byte_latency' : ( 0.1 , 'txID008' ) , #NEWLINE# 'worst_last_byte_latency' : ( 0.2 , 'txID008' ) , #NEWLINE# 'req_count' : 1 , #NEWLINE# 'retries' : 1 , #NEWLINE# 'retry_rate' : 100.0 , #NEWLINE# 'errors' : 0 , #NEWLINE# 'start' : 103.3 , #NEWLINE# 'stop' : 103.5 , #NEWLINE# #UNINDENT# } ) , ( 'small' , { #NEWLINE# #INDENT# 'avg_req_per_sec' : 0.333333 , #NEWLINE# 'first_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 1.0 ) , #NEWLINE# 'max' : ( '%7.3f' % 1.0 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 1.0 ) , #NEWLINE# 'median' : ( '%7.3f' % 1.0 ) , #NEWLINE# 'min' : ( '%6.3f' % 1.0 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'last_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 3.0 ) , #NEWLINE# 'max' : ( '%7.3f' % 3.0 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 3.0 ) , #NEWLINE# 'median' : ( '%7.3f' % 3.0 ) , #NEWLINE# 'min' : ( '%6.3f' % 3.0 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'worst_first_byte_latency' : ( 1.0 , 'txID002' ) , #NEWLINE# 'worst_last_byte_latency' : ( 3.0 , 'txID002' ) , #NEWLINE# 'req_count' : 1 , #NEWLINE# 'retries' : 0 , #NEWLINE# 'retry_rate' : 0.0 , #NEWLINE# 'errors' : 0 , #NEWLINE# 'start' : 100.0 , #NEWLINE# 'stop' : 103.0 , #NEWLINE# #UNINDENT# } ) , ( 'huge' , { #NEWLINE# #INDENT# 'avg_req_per_sec' : 0.454545 , #NEWLINE# 'first_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 1.2 ) , #NEWLINE# 'max' : ( '%7.3f' % 1.2 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 1.2 ) , #NEWLINE# 'median' : ( '%7.3f' % 1.2 ) , #NEWLINE# 'min' : ( '%6.3f' % 1.2 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'last_byte_latency' : { #NEWLINE# #INDENT# 'avg' : ( '%7.3f' % 2.2 ) , #NEWLINE# 'max' : ( '%7.3f' % 2.2 ) , #NEWLINE# 'pctile' : ( '%7.3f' % 2.2 ) , #NEWLINE# 'median' : ( '%7.3f' % 2.2 ) , #NEWLINE# 'min' : ( '%6.3f' % 2.2 ) , #NEWLINE# 'std_dev' : ( '%7.3f' % 0.0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'worst_first_byte_latency' : ( 1.2 , 'txID004' ) , #NEWLINE# 'worst_last_byte_latency' : ( 2.2 , 'txID004' ) , #NEWLINE# 'req_count' : 1 , #NEWLINE# 'retries' : 0 , #NEWLINE# 'retry_rate' : 0.0 , #NEWLINE# 'errors' : 0 , #NEWLINE# 'start' : 103.8 , #NEWLINE# 'stop' : 106.0 , #NEWLINE# #UNINDENT# } ) ] ) ) , self . reporter . stats [ 'op_stats' ] [ ssbench . CREATE_OBJECT ] )