New submission from Jean-Paul Calderone <[email protected]>:
Consider this transcript:
>>> cProfile.run("import time; time.sleep(1)")
4 function calls in 1.012 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.011 0.011 1.012 1.012 <string>:1(<module>)
1 0.000 0.000 1.012 1.012 {built-in method exec}
1 1.001 1.001 1.001 1.001 {built-in method sleep}
1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
>>>
It is not the case that the profiled code uses >1 CPU seconds. It spends the
entire time sleeping. The default timer for cProfile is a wallclock timer.
The output should reflect this.
----------
messages: 120890
nosy: exarkun
priority: normal
severity: normal
status: open
title: cProfile incorrectly labels its output
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10377>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com