STINNER Victor added the comment:

Thanks for your bug report.

I fixed the issue differently, by adding a base class to benchmark result 
classes. I also implemented the format output format for pybench.

By the way, perf.py badly handles errors :-/ CSV output and table output fail 
to handle errors.

pybench output with my change:
*******************
$ ./perf.py -f -r -b pybench python2.7 python2.7 
(...)

### pybench ###
Min: 285 -> 284: 1.00x faster
Avg: 289 -> 292: 1.01x slower


$ ./perf.py -f --csv=pybench.csv -r -b pybench python2.7 python2.7 
(...)

### pybench ###
Min: 283 -> 286: 1.01x slower
Avg: 287 -> 290: 1.01x slower


$ cat pybench.csv
Benchmark,Base,Changed
pybench,283.000000,286.000000


$ ./perf.py -f -O table -r -b pybench python2.7 python2.7 
(...)
+-----------+-----------+-----------+--------------+
| Benchmark | python2.7 | python2.7 | Change       |
+===========+===========+===========+==============+
| pybench   | 288.0     | 289.0     | 1.00x slower |
+-----------+-----------+-----------+--------------+
*******************

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25721>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to