Issue 25721: Fix pybench always_display error (original) (raw)

Created on 2015-11-24 12:06 by florin.papa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_pybench_results.patch florin.papa,2015-11-24 12:32
Messages (5)
msg255262 - (view) Author: Florin Papa (florin.papa) * Date: 2015-11-24 12:06
Hi all, This is Florin Papa from the Server Languages Optimizations Team at Intel Corporation. The patch submitted here solves a crash occurring on Python 2.7 after running pybench from perf.py (python perf.py -r -b pybench base_python modified_python). The error appears when trying to display the results of the run because the PyBenchBenchmarkResult class does not include the attribute "always_display". Here is the error message received: File "../benchmarks/perf.py", line 2574, in main if result.always_display: AttributeError: 'PyBenchBenchmarkResult' object has no attribute 'always_display' To apply the patch please follow these steps: hg clone https://hg.python.org/benchmarks cd benchmarks/ copy fix_pybench_results.patch to the current directory hg import --no-commit fix_pybench_results.patch Thank you, Florin Papa
msg255330 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-25 10:23
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 +-----------+-----------+-----------+--------------+ *******************
msg255331 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-11-25 10:23
New changeset e77ed7d18a68 by Victor Stinner in branch 'default': Issue #25721: Fixes for pybench https://hg.python.org/benchmarks/rev/e77ed7d18a68
msg255332 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-25 10:24
Is it ok for you Florin? (Can I close the issue?)
msg255340 - (view) Author: Florin Papa (florin.papa) * Date: 2015-11-25 13:20
Yes, thank you for fixing this.
History
Date User Action Args
2022-04-11 14:58:24 admin set github: 69907
2015-11-25 14:21:32 vstinner set status: open -> closedresolution: fixed
2015-11-25 13:20:10 florin.papa set messages: +
2015-11-25 10:24:19 vstinner set messages: +
2015-11-25 10:23:51 python-dev set nosy: + python-devmessages: +
2015-11-25 10:23:43 vstinner set nosy: + vstinnermessages: +
2015-11-24 19:24:32 brett.cannon set type: crash ->
2015-11-24 12:32:51 florin.papa set files: + fix_pybench_results.patchkeywords: + patch
2015-11-24 12:06:54 florin.papa set type: crash
2015-11-24 12:06:23 florin.papa create