<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_profile.py, branch 2.6</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_profile.py?h=2.6</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_profile.py?h=2.6'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2009-05-30T21:43:48Z</updated>
<entry>
<title>Merged revisions 73064-73065 via svnmerge from</title>
<updated>2009-05-30T21:43:48Z</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2009-05-30T21:43:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6987d541160ae69f896d0344f47230cbb12914e4'/>
<id>urn:sha1:6987d541160ae69f896d0344f47230cbb12914e4</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73064 | antoine.pitrou | 2009-05-30 23:27:00 +0200 (sam., 30 mai 2009) | 4 lines

  Issue #5330: C functions called with keyword arguments were not reported by
  the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
........
  r73065 | antoine.pitrou | 2009-05-30 23:39:25 +0200 (sam., 30 mai 2009) | 3 lines

  The test for #5330 wasn't correct.
........
</content>
</entry>
<entry>
<title>Some tests did not pass on repeated calls (regrtest -R::)</title>
<updated>2008-04-18T23:31:33Z</updated>
<author>
<name>Amaury Forgeot d'Arc</name>
<email>amauryfa@gmail.com</email>
</author>
<published>2008-04-18T23:31:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=607bff1ebe81e869697e228322da4c308e8753a5'/>
<id>urn:sha1:607bff1ebe81e869697e228322da4c308e8753a5</id>
<content type='text'>
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
</content>
</entry>
<entry>
<title>* Use the same code to profile for test_profile and test_cprofile.</title>
<updated>2008-02-05T19:58:17Z</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2008-02-05T19:58:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b70907796ac6e911f8683cce354fdeb94d24d73f'/>
<id>urn:sha1:b70907796ac6e911f8683cce354fdeb94d24d73f</id>
<content type='text'>
* Convert both to unittest.
* Use the same unit testing code.
* Include the expected output in both test files.
* Make it possible to regenerate the expected output by running
  the file as a script with an '-r' argument.
</content>
</entry>
<entry>
<title>Added the cProfile module.</title>
<updated>2006-02-08T12:53:56Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2006-02-08T12:53:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a871ef2b3e924f058ec1b0aed7d4c83a546414b7'/>
<id>urn:sha1:a871ef2b3e924f058ec1b0aed7d4c83a546414b7</id>
<content type='text'>
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!
</content>
</entry>
<entry>
<title>test and fix for buggy handling of exceptions raised by C functions,</title>
<updated>2005-09-20T18:50:13Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2005-09-20T18:50:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f87902448753ece981b5df938c070320705e5dec'/>
<id>urn:sha1:f87902448753ece981b5df938c070320705e5dec</id>
<content type='text'>
causing the profiler to crash on an AssertionError if the same Python
function catches multiple exceptions from C functions.
</content>
</entry>
<entry>
<title>Whitespace normalization.</title>
<updated>2004-07-08T04:22:35Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-07-08T04:22:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=27f883687ba01f571ff7cc03a3f03b94030f92ad'/>
<id>urn:sha1:27f883687ba01f571ff7cc03a3f03b94030f92ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added global runctx function to profile to fix SF Bug #716587</title>
<updated>2004-03-22T20:12:56Z</updated>
<author>
<name>Nicholas Bastin</name>
<email>nick.bastin@gmail.com</email>
</author>
<published>2004-03-22T20:12:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1eb4bfc6579133c2d7a495141b1f754dfecf0fc6'/>
<id>urn:sha1:1eb4bfc6579133c2d7a495141b1f754dfecf0fc6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Whitespace normalization.</title>
<updated>2001-10-04T05:36:56Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-04T05:36:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=527e64fd68046cb6e2ff35afaf077160346d37ff'/>
<id>urn:sha1:527e64fd68046cb6e2ff35afaf077160346d37ff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Hopefully fix the profiler right.  Add a test suite that checks that</title>
<updated>2001-10-04T00:58:24Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-04T00:58:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f137f75ab82019b7b4db6d45bd69e2c0b155b2eb'/>
<id>urn:sha1:f137f75ab82019b7b4db6d45bd69e2c0b155b2eb</id>
<content type='text'>
it deals correctly with some anomalous cases; according to this test
suite I've fixed it right.

The anomalous cases had to do with 'exception' events: these aren't
generated when they would be most helpful, and the profiler has to
work hard to recover the right information.  The problems occur when C
code (such as hasattr(), which is used as the example here) calls back
into Python code and clears an exception raised by that Python code.
Consider this example:

    def foo():
        hasattr(obj, "bar")

Where obj is an instance from a class like this:

    class C:
        def __getattr__(self, name):
            raise AttributeError

The profiler sees the following sequence of events:

    call (foo)
    call (__getattr__)
    exception (in __getattr__)
    return (from foo)

Previously, the profiler would assume the return event returned from
__getattr__. An if statement checking for this condition and raising
an exception was commented out...  This version does the right thing.
</content>
</entry>
</feed>
