[issue4714] print opcode stats at the end of pybench runs

2021-01-04 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> out of date
stage: patch review -> resolved
status: languishing -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4714] print opcode stats at the end of pybench runs

2014-06-22 Thread Mark Lawrence

Mark Lawrence added the comment:

@Antoine/Marc-Andre are either of you interested in taking this forward?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4714
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4714] print opcode stats at the end of pybench runs

2010-07-21 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
status: open - languishing
versions: +Python 3.2 -Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4714
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4714] print opcode stats at the end of pybench runs

2008-12-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

On 2008-12-21 22:37, Antoine Pitrou wrote:
 New submission from Antoine Pitrou pit...@free.fr:
 
 This patch prints opcode statistics at the end of a pybench run if
 DYNAMIC_EXECUTION_PROFILE has been enabled when compiling the interpreter.
 
 Is it ok? Is it better to add it to the Benchmark class?

I don't think it's worth doing this for low-level and highly
artificial benchmarks like the ones run by pybench.

Opcode statistics are much better taken in real life applications,
e.g. let Django, Zope, etc. run for a day or two and then look
at the opcode statistics.

If at all, then opcode statistics should be an optional feature
enabled by a command line switch. I'd then create new methods
bench.start_opcode_stats(), bench.stop_opcode_stats() and
bench.get_opcode_stats().

Also note that this line will result in wrong results:

+if opstats:
+opstats = [new - old
+for new, old in zip(sys.getdxp(), opstats)]

It should be:

start_opstats = sys.getdxp()
...
stop_opstats = sys.getdxp()
opstats = [new_value - old_value
   for new_value, old_value in zip(stop_opstats, start_opstats]

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4714
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4714] print opcode stats at the end of pybench runs

2008-12-22 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I don't think it's worth doing this for low-level and highly
 artificial benchmarks like the ones run by pybench.

Well, it can help to know which opcodes are executed when running a
particular bunch of sub-tests :)

 If at all, then opcode statistics should be an optional feature
 enabled by a command line switch. I'd then create new methods
 bench.start_opcode_stats(), bench.stop_opcode_stats() and
 bench.get_opcode_stats().
 
 Also note that this line will result in wrong results:
 
 +if opstats:
 +opstats = [new - old
 +for new, old in zip(sys.getdxp(), opstats)]

You are right, my assumption was simply that the error would be in the
noise.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4714
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4714] print opcode stats at the end of pybench runs

2008-12-21 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This patch prints opcode statistics at the end of a pybench run if
DYNAMIC_EXECUTION_PROFILE has been enabled when compiling the interpreter.

Is it ok? Is it better to add it to the Benchmark class?

--
components: Demos and Tools
files: pybench-opcodestats.patch
keywords: patch
messages: 78157
nosy: lemburg, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: print opcode stats at the end of pybench runs
type: feature request
versions: Python 3.0
Added file: http://bugs.python.org/file12417/pybench-opcodestats.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4714
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com