#NEWLINE# def capture_test_metrics( self ) : #NEWLINE# #INDENT# self . clock . now = 1 #NEWLINE# h1 = self . registry . histogram ( 'hist' ) #NEWLINE# for i in range ( 10 ) : #NEWLINE# #INDENT# h1 . add ( ( 2 ** i ) ) #NEWLINE# #UNINDENT# gcb = self . registry . gauge ( 'gcb' , ( lambda : 123 ) ) #NEWLINE# gsimple = self . registry . gauge ( 'gsimple' ) . set_value ( 42 ) #NEWLINE# t1 = self . registry . timer ( 't1' ) #NEWLINE# m1 = self . registry . meter ( 'm1' ) #NEWLINE# m1 . mark ( ) #NEWLINE# with t1 . time ( ) : #NEWLINE# #INDENT# c1 = self . registry . counter ( 'c1' ) #NEWLINE# c2 = self . registry . counter ( 'counter-2' ) #NEWLINE# c1 . inc ( ) #NEWLINE# c2 . dec ( ) #NEWLINE# c2 . dec ( ) #NEWLINE# self . clock . add ( 1 )