I'm trying to use cprofile in a mod_python based application.
I point my web server to a profiling function that calls my "main"
function. I can't seem to get it to work correctly. I'm getting
garbage sent to my profile output and when I call pstats Its telling
me my main function is not defined. I've tried both cprofile.run and
cprofile.runctx.
def handler( req ):
f = '/tmp/foo.prof'
cProfile.run('mainprofiled(req)',f)
#stats = pstats.Stats(f)
return apache.OK
def mainprofiled(req):
#python code
Are there some good mod_python based profiling examples someone could
point me to?
--
You received this message because you are subscribed to the Google Groups "mod_python" group.
To post to this group, send email to
mod_p...@googlegroups.com.
To unsubscribe from this group, send email to
mod_python+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mod_python?hl=en.