Actually cProfile in the current stackless branch is stackless aware. The problem is with enabling profiling on _all_ tasklets. I have such a patch with my local version, but it is not in the central version yet. There is the same profile with slprofile (something I wrote). The usage of cProfile would be:
P = cProfile.Profile() P.enable() ... run your stackless program for a while p.disable() p.print_stats() or something like that. The change to enable profiling on all tasklets is very small and I should probably commit it to stackless... K -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Francis Sent: Sunday, November 07, 2010 3:46 To: [email protected] Cc: [email protected] Subject: Re: [Stackless] How to profile python code running inside tasklets? Hi Heinrich: I know there is a module called slprofile. I am not sure where slprofile is located but I believe I have a copy of the module somewhere. I never had much luck with it but this is just probably me. Here is a URL about slprofile I have from 2008: http://www.stackless.com/pipermail/stackless/2008-December/003814.html Cheers, Andrew --- On Sat, 11/6/10, [email protected] <[email protected]> wrote: > From: [email protected] > <[email protected]> > Subject: Stackless Digest, Vol 82, Issue 2 > To: [email protected] > Date: Saturday, November 6, 2010, 4:00 AM Send Stackless mailing list > submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.stackless.com/mailman/listinfo/stackless > or, via email, send a message with subject or body 'help' > to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Stackless digest..." > > > Today's Topics: > > 1. How to profile python code running inside tasklets? > (Heinrich Schmetterling) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 5 Nov 2010 16:50:11 -0700 > From: Heinrich Schmetterling <[email protected]> > To: [email protected] > Subject: [Stackless] How to profile python code running inside > tasklets? > Message-ID: > > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > I'm using cProfile and recently converted some functions to be run > inside tasklets. It doesn't look like cProfile can profile anything > run within stackless.run(). Is there a way to do so, or use another > profiler module to do so? Thanks, > > Heinrich > -------------- next part -------------- An HTML attachment was > scrubbed... > URL: > <http://www.stackless.com/pipermail/stackless/attachments/20101105/ff9 > 060b3/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless > > End of Stackless Digest, Vol 82, Issue 2 > **************************************** > _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
