[Zope] profiling my python product
richard hitier
richard.hitier@idealx.com
Tue, 5 Jun 2001 14:11:56 +0200
Hi,
I'm looking for profiling with the python profiler my product called by
the zope server.
None of the tricks used worked:
1- inserting profile.run('method()', 'profile.log')
in the main script, doesn't even create the profile.log file.
2- ZPublisher.Zope('my_product/my_method')
(to be called in a script with profile.py )
crashes while calling http://localhost:9376/my_product/my_method via
the browser works;
there's the traceback message that I don't understand
<!--
Traceback (innermost last):
File /usr/lib/zope/lib/python/ZPublisher/Test.py, line 261, in publish_module
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
File /usr/lib/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 151, in publish
File /usr/lib/zope/lib/python/ZPublisher/BaseRequest.py, line 308, in traverse
File /usr/lib/zope/lib/python/OFS/Application.py, line 249, in __bobo_traverse__
(Object: ApplicationDefaultPermissions)
File /usr/lib/zope/lib/python/ZPublisher/HTTPResponse.py, line 511, in
notFoundError
NotFound: (see above)
-->
3- /usr/lib/zope/utilities/load_site.py my_url
doesn't crash, but I don't get any output.
What should it do ? I don't know.
4- python ZPublisher/Test.py my_module
seems to contain some profiling methods, but also crashes:
Traceback (innermost last):
File "Test.py", line 448, in ?
if __name__ == "__main__": main()
File "Test.py", line 212, in main
s=silent)
File "Test.py", line 445, in publish
publish_module(file, environ=env, stdout=stdout, extra=extra)
File "Test.py", line 261, in publish_module
response = publish(request, module_name, after_list, debug=debug)
File "/usr/lib/zope/lib/python/ZPublisher/Publish.py", line 120, in publish
(bobo_before, bobo_after, object, realm, debug_mode, err_hook,
File "/usr/lib/zope/lib/python/ZPublisher/Publish.py", line 262, in get_module_info
module=__import__(module_name, globals(), globals(), ('__doc__',))
ImportError: (<class exceptions.ImportError at 8053640>, 'No module
named my_module')
And unfortunately, no documentation about this :(
Any help appreciated :-)
I also want to say once again that
http://hostname:port/my_module/ works fine
Thanks
--
Richard Hitier PGP Key on pgp.mit.edu
richard.hitier@IDEALX.com key 0xD1BAD022