comparison contrib/perf.py @ 40141:8643219146e1

perf: fix -T json The previous code was mixing formatting and data, breaking `-T json` with unexpected data. We fix the issue and add a test to prevent future regression.
author Boris Feld <boris.feld@octobus.net>
date Mon, 01 Oct 2018 17:53:47 +0200
parents 874712506b07
children 25ce80ce84c5
comparison
equal deleted inserted replaced
40140:46f9b1d2daf0 40141:8643219146e1
305 fm.plain(b'!') 305 fm.plain(b'!')
306 fm.write(prefix + b'wall', b' wall %f', entry[0]) 306 fm.write(prefix + b'wall', b' wall %f', entry[0])
307 fm.write(prefix + b'comb', b' comb %f', entry[1] + entry[2]) 307 fm.write(prefix + b'comb', b' comb %f', entry[1] + entry[2])
308 fm.write(prefix + b'user', b' user %f', entry[1]) 308 fm.write(prefix + b'user', b' user %f', entry[1])
309 fm.write(prefix + b'sys', b' sys %f', entry[2]) 309 fm.write(prefix + b'sys', b' sys %f', entry[2])
310 fm.write(prefix + b'count', b' (%s of %d)', role, count) 310 fm.write(prefix + b'count', b' (%s of %%d)' % role, count)
311 fm.plain(b'\n') 311 fm.plain(b'\n')
312 results.sort() 312 results.sort()
313 min_val = results[0] 313 min_val = results[0]
314 display(b'best', min_val) 314 display(b'best', min_val)
315 if displayall: 315 if displayall: