#NEWLINE# def __interval_json( self , item , sec ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'ec' : item [ KPISet . FAILURES ] , #NEWLINE# 'ts' : sec [ DataPoint . TIMESTAMP ] , #NEWLINE# 'na' : item [ KPISet . CONCURRENCY ] , #NEWLINE# 'n' : item [ KPISet . SAMPLE_COUNT ] , #NEWLINE# 'failed' : item [ KPISet . FAILURES ] , #NEWLINE# 'rc' : [ ] , #NEWLINE# 't' : { #NEWLINE# #INDENT# 'min' : ( int ( ( 1000 * item [ KPISet . PERCENTILES ] [ '0.0' ] ) ) if ( '0.0' in item [ KPISet . PERCENTILES ] ) else 0 ) , #NEWLINE# 'max' : ( int ( ( 1000 * item [ KPISet . PERCENTILES ] [ '100.0' ] ) ) if ( '100.0' in item [ KPISet . PERCENTILES ] ) else 0 ) , #NEWLINE# 'sum' : ( ( 1000 * item [ KPISet . AVG_RESP_TIME ] ) * item [ KPISet . SAMPLE_COUNT ] ) , #NEWLINE# 'n' : item [ KPISet . SAMPLE_COUNT ] , #NEWLINE# 'std' : ( 1000 * item [ KPISet . STDEV_RESP_TIME ] ) , #NEWLINE# 'avg' : ( 1000 * item [ KPISet . AVG_RESP_TIME ] ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'lt' : { #NEWLINE# #INDENT# 'min' : 0 , #NEWLINE# 'max' : 0 , #NEWLINE# 'sum' : ( ( 1000 * item [ KPISet . AVG_LATENCY ] ) * item [ KPISet . SAMPLE_COUNT ] ) , #NEWLINE# 'n' : ( 1000 * item [ KPISet . SAMPLE_COUNT ] ) , #NEWLINE# 'std' : 0 , #NEWLINE# 'avg' : ( 1000 * item [ KPISet . AVG_LATENCY ] ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'by' : { #NEWLINE# #INDENT# 'min' : 0 , #NEWLINE# 'max' : 0 , #NEWLINE# 'sum' : 0 , #NEWLINE# 'n' : 0 , #NEWLINE# 'std' : 0 , #NEWLINE# 'avg' : 0 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# }