Author: Antonio Cuni <[email protected]>
Branch:
Changeset: r133:32d83a5e353b
Date: 2011-07-25 15:41 +0200
http://bitbucket.org/pypy/benchmarks/changeset/32d83a5e353b/
Log: try to have shorter names, like trans_rtype instead of
translate_rtype_lltype
diff --git a/benchmarks.py b/benchmarks.py
--- a/benchmarks.py
+++ b/benchmarks.py
@@ -75,6 +75,9 @@
line.startswith('Total:')):
continue
name, _, time = map(str.strip, line.partition('---'))
+ name = name.replace('_lltype', '')
+ name = name.replace('_c', '')
+ name = name.replace('stackcheckinsertion', 'stackcheck')
assert time.endswith(' s')
time = float(time[:-2])
timings.append((name, time))
@@ -87,6 +90,7 @@
'[Timer] Timings:',
'[Timer] annotate --- 1.3 s',
'[Timer] rtype_lltype --- 4.6 s',
+ '[Timer] stackcheckinsertion_lltype --- 2.3 s',
'[Timer] database_c --- 0.4 s',
'[Timer] ========================================',
'[Timer] Total: --- 6.3 s',
@@ -96,8 +100,9 @@
timings = parse_timer(lines)
assert timings == [
('annotate', 1.3),
- ('rtype_lltype', 4.6),
- ('database_c', 0.4)
+ ('rtype', 4.6),
+ ('stackcheck', 2.3),
+ ('database', 0.4)
]
def BM_translate(base_python, changed_python, options):
@@ -130,3 +135,4 @@
data = RawResult([time], None)
result.append((name, data))
return result
+BM_translate.benchmark_name = 'trans'
diff --git a/unladen_swallow/perf.py b/unladen_swallow/perf.py
--- a/unladen_swallow/perf.py
+++ b/unladen_swallow/perf.py
@@ -1607,6 +1607,7 @@
# PyPy specific modification: let the func to return a list of results
# for sub-benchmarks
bench_result = func(base_cmd_prefix, changed_cmd_prefix, options)
+ name = getattr(func, 'benchmark_name', name)
if isinstance(bench_result, list):
for subname, subresult in bench_result:
fullname = '%s_%s' % (name, subname)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit