#NEWLINE# def __call__( self , cls ) : #NEWLINE# #INDENT# if self . enable : #NEWLINE# #INDENT# super ( BenchmarkedClass , self ) . __call__ ( cls ) #NEWLINE# setup_src = self . setup_src #NEWLINE# setup_src += '\ninstance = {}' . format ( self . stmt ) #NEWLINE# groups = set ( ) #NEWLINE# for p in self . bound_functions [ cls . __name__ ] : #NEWLINE# #INDENT# stmt = p . stmt #NEWLINE# p . run_timeit ( stmt , setup_src ) #NEWLINE# p . write_log ( ) #NEWLINE# if isinstance ( p , BenchmarkedFunction ) : #NEWLINE# #INDENT# print ( '{} \t {}' . format ( p . callable . __name__ , convert_time_units ( p . time_average_seconds ) ) ) #NEWLINE# #UNINDENT# if ( hasattr ( p , 'result_validation' ) and p . result_validation and ( p . group not in groups ) ) : #NEWLINE# #INDENT# self . validate ( p . groups [ p . group ] ) #NEWLINE# #UNINDENT# groups . add ( p . group ) #NEWLINE# #UNINDENT# #UNINDENT# return cls