diff -r 43f8a0f5edd3 perf.py --- a/perf.py Fri Nov 23 23:40:58 2012 +0100 +++ b/perf.py Sun Mar 10 22:04:46 2013 +0530 @@ -2220,12 +2220,18 @@ all_benchmarks = bench_funcs.keys() bench_groups["all"] = all_benchmarks + # Calculate the number of expanded benchmark names for every group + bench_counts = {} + for name in bench_groups: + bench_counts[name] = sum(1 for _ in + _ExpandBenchmarkName(name, bench_groups)) + # Prettify the displayed benchmark list: first the benchmark groups by # decreasing number of benches, then individual benchmarks by # lexicographic order. pretty_benchmarks = ["%s(%d)" % (name, nbenchs) for nbenchs, name in sorted( - ((len(v), k) for (k, v) in bench_groups.items()), + ((v, k) for (k, v) in bench_counts.items()), reverse=True)] pretty_benchmarks.extend(sorted(all_benchmarks))