#NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# msg_rate = ( self . _stats [ 'msgcount' ] / ( self . _stats [ 'etime' ] - self . _stats [ 'stime' ] ) ) #NEWLINE# max_v = max ( self . _stats [ 'latency' ] ) #NEWLINE# min_v = min ( self . _stats [ 'latency' ] ) #NEWLINE# avg_v = ( max_v / float ( t . _stats [ 'msgcount' ] ) ) #NEWLINE# t = [ '-STATS-' , ( 'min: %f' % min_v ) , ( 'max: %f' % max_v ) , ( 'avg: %f' % avg_v ) , ( 'rate: %s' % msg_rate ) , ( 'msgcount: %d' % self . _stats [ 'msgcount' ] ) , '-EOF-' ] #NEWLINE# return str ( '\n' . join ( t ) )