[Python-checkins] benchmarks: Issue #25443: Add a running count of benchmarks.
brett.cannon
python-checkins at python.org
Fri Oct 30 17:37:17 EDT 2015
https://hg.python.org/benchmarks/rev/71967658feb5
changeset: 231:71967658feb5
user: Brett Cannon <brett at python.org>
date: Fri Oct 30 14:37:13 2015 -0700
summary:
Issue #25443: Add a running count of benchmarks.
files:
perf.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/perf.py b/perf.py
--- a/perf.py
+++ b/perf.py
@@ -2552,9 +2552,12 @@
base_cmd_prefix, changed_cmd_prefix)
results = []
- for name in sorted(should_run):
+ to_run = list(sorted(should_run))
+ run_count = str(len(to_run))
+ for index, name in enumerate(to_run):
func = bench_funcs[name]
- print("Running %s..." % name)
+ print("[%s/%s] %s..." %
+ (str(index+1).rjust(len(run_count)), run_count, name))
options.benchmark_name = name # Easier than threading this everywhere.
results.append((name, func(base_cmd_prefix, changed_cmd_prefix,
options)))
--
Repository URL: https://hg.python.org/benchmarks
More information about the Python-checkins
mailing list