I would like to enable a side-logging in our real-world Trac/mod_python installation that has gotten quite slow (lots of plugins, not so many tickets/pages).
Can I proxy the request object, or add a python trace (with timestamps for each call) somehow? Is there e mechanism for these kind of wrappers?
The main entry point in Trac/mod_python is
def handler(req):
pkg_resources.require('Trac==%s' % VERSION)
gateway = ModPythonGateway(req, req.get_options())
from trac.web.main import dispatch_request
gateway.run(dispatch_request)
return apache.OK
and there I guess I should install a wrapper, that can trace python calls through all plugins for timing analysis. Possible?