Commit Graph

2 Commits

Author SHA1 Message Date
Florent Xicluna 928474561c Merged revisions 83524,84776 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83524 | georg.brandl | 2010-08-02 14:20:23 +0200 (lun., 02 août 2010) | 1 line

  #9428: fix running scripts from profile/cProfile with their own name and the right namespace.  Same fix as for trace.py in #1690103.
........
  r84776 | florent.xicluna | 2010-09-13 18:35:02 +0200 (lun., 13 sept. 2010) | 1 line

  Make test.regrtest.__file__ absolute, this was not always the case when running profile or trace, for example.  (issue #9323)
........
2010-09-13 17:36:36 +00:00
Armin Rigo a871ef2b3e Added the cProfile module.
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof

* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
   - explain the differences between the three profilers that we have now
   - profile and cProfile can use a unified documentation, like (c)Pickle
   - mention that hotshot is "for specialized usage" now
   - removed references to the "old profiler" that no longer exists
* test updates:
   - extended test_profile to cover delicate cases like recursion
   - added tests for the caller/callee displays
   - added test_cProfile, performing the same tests for cProfile
* TO-DO:
   - cProfile gives a nicer name to built-in, particularly built-in methods,
     which could be backported to profile.
   - not tested on Windows recently!
2006-02-08 12:53:56 +00:00