[Python-Dev] Request review of cProfile/profile series issue
wes.turner at gmail.com
Mon Apr 24 23:15:38 EDT 2017
On Sun, Apr 23, 2017 at 11:12 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 23 April 2017 at 13:21, Louie Lu <me at louie.lu> wrote:
> > Hi all,
> > I'm now looking for cProfile/profile lib's issue, and have solve a
> series of
> > dependent problem, here is the list:
> > #9285 - Add a profile decorator to profile and cProfile
> > #30113 - Allow helper functions to wrap sys.setprofile
> > #18971 - Use argparse in the profile/cProfile modules
> > #30118 - Add unittest for cProfile/profile command line interface
> > It can divide into two categories, first is the context manager problem,
> > the second is optparse to argparse problem.
> > 1. context manager problem:
> > Relative issue: #9285, #30113
> > Relative PR: #287, #1212, #1253
> > This is an issue since 2010, and stop at profile can't simply add a
> > __enter__ and __exit__ to make it a context manager. The main problem is,
> > sys.setprofile() will hit the return and get bad return in profile
> > dispatch_return function. The solution is to insert a simulate call in
> > helper function, to provide the context between helper frame and where
> > profile is defined.
> I'd like to second Louie's call for additional review here. I've been
> reviewing them so far, and they look sensible to me, but I don't
> personally know the profile code base at all,
so there's a strong
> chance I'll miss subtle details.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev