def pretty(timings, label):
        '''Print timing stats'''
        results = [(sum(values), len(values), key)
            for key, values in timings.items()]
        print(label)
        print('=' * 65)
        print('%20s => %13s | %8s | %13s' % (
            'Command', 'Average', '# Calls', 'Total time'))
        print('-' * 65)
        for total, length, key in sorted(results, reverse=True):
            print('%20s => %10.5f us | %8i | %10i us' % (
                key, float(total) / length, length, total))
def pretty ( timings , label ) : results = [ ( sum ( values ) , len ( values ) , key ) for key , values in timings . items ( ) ] print ( label ) print ( '=' * 65 ) print ( '%20s => %13s | %8s | %13s' % ( 'Command' , 'Average' , '# Calls' , 'Total time' ) ) print ( '-' * 65 ) for total , length , key in sorted ( results , reverse = True ) : print ( '%20s => %10.5f us | %8i | %10i us' % ( key , float ( total ) / length , length , total ) )
Print timing stats