Commit c8c3a1fc authored by Mathieu Giraud's avatar Mathieu Giraud

benchmark-releases.py: factor

parent a6682961
...@@ -252,19 +252,16 @@ def show_benchs(f, colorize): ...@@ -252,19 +252,16 @@ def show_benchs(f, colorize):
for tag in BENCHS: for tag in BENCHS:
f.write('%8s' % tag) f.write('%8s' % tag)
f.write(color(ANSI.YELLOW, '\nTime (s)\n', colorize)) for (key, index, format) in [
('Time (s)', 0, '%8.2f'),
previous_release = None ('Memory (MB)', 1, '%8d'),
for release in installed(): ]:
bench_line(f, release, stats, 0, '%8.2f', previous_release, colorize) f.write(color(ANSI.YELLOW, '\n%s\n' % key, colorize))
previous_release = release previous_release = None
for release in installed():
bench_line(f, release, stats, index, format, previous_release, colorize)
previous_release = release
previous_release = None
f.write(color(ANSI.YELLOW, '\nMemory (MB)\n', colorize))
for release in installed():
bench_line(f, release, stats, 1, '%8d', previous_release, colorize)
previous_release = release
def bench_all(retries, selected_benchs): def bench_all(retries, selected_benchs):
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment