comparison contrib/revsetbenchmarks.py @ 51690:493034cc3265

black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 18 Jul 2024 12:36:12 +0200
parents 6000f5b25c9b
children 7f0cb9ee0534
comparison
equal deleted inserted replaced
51689:39e2b2d062c1 51690:493034cc3265
189 return 'x%ix%i' % (factor, order) 189 return 'x%ix%i' % (factor, order)
190 190
191 191
192 def formattiming(value): 192 def formattiming(value):
193 """format a value to strictly 8 char, dropping some precision if needed""" 193 """format a value to strictly 8 char, dropping some precision if needed"""
194 if value < 10 ** 7: 194 if value < 10**7:
195 return ('%.6f' % value)[:8] 195 return ('%.6f' % value)[:8]
196 else: 196 else:
197 # value is HUGE very unlikely to happen (4+ month run) 197 # value is HUGE very unlikely to happen (4+ month run)
198 return '%i' % value 198 return '%i' % value
199 199
369 369
370 print() 370 print()
371 print() 371 print()
372 372
373 for ridx, rset in enumerate(revsets): 373 for ridx, rset in enumerate(revsets):
374
375 print("revset #%i: %s" % (ridx, rset)) 374 print("revset #%i: %s" % (ridx, rset))
376 printheader(variants, len(results), verbose=options.verbose, relative=True) 375 printheader(variants, len(results), verbose=options.verbose, relative=True)
377 ref = None 376 ref = None
378 for idx, data in enumerate(results): 377 for idx, data in enumerate(results):
379 printresult( 378 printresult(