This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Unified Benchmark Suite fails on py3k with --track-memory
Type: behavior Stage:
Components: Benchmarks Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: bobbyi, collinwinter, pitrou
Priority: normal Keywords: patch

Created on 2010-11-12 19:21 by bobbyi, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
perf.patch bobbyi, 2010-11-12 19:21
Messages (2)
msg121060 - (view) Author: Bobby Impollonia (bobbyi) Date: 2010-11-12 19:21
Steps to reproduce (requires linux because the --track-memory (-m) option to perf.py is linux-only):
hg clone http://hg.python.org/benchmarks/ py2benchmarks
mkdir py3benchmarks
cd py3benchmarks
../py2benchmarks/make_perf3.sh ../py2benchmarks
py3k perf.py -f -m -b normal_startup old_py3k new_py3k

With --track-memory, the normal_startup benchmark (which is part of the py3k benchmark group) invokes the interpreter under test as:
py3k -c 'for _ in xrange(200000): pass'

This fails on py3k due to the use of xrange, which is not caught by 2to3 since it appears inside a quoted string (the command line argument).

A patch is attached that resolves the issue by changing the for loop with xrange into a while loop.
msg121074 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-11-12 20:49
Please note that some benchmarks are now natively py3k-compatible, you don't have to run make_perf3.sh.
Anyway, the patch is now pushed to http://hg.python.org/benchmarks/rev/7c7dc1c4d8d4, thank you!
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54606
2010-11-12 20:49:36pitrousetstatus: open -> closed
resolution: fixed
messages: + msg121074
2010-11-12 19:21:49bobbyicreate