← Back to team overview

launchpad-dev team mailing list archive

Getting KCacheGrind profiles of pages on launchpad.dev

 

Hi everyone,

During the Epic Robert and I coded up and landed a patch that generates KCacheGrind profiles for launchpad requests. KCacheGrind is a powerful tool for exploring call graphs, and this change should make it easier to see what pieces of Python are taking the most time to run.
To switch on profiling, add this to configs/development/launchpad-lazr.conf:


    [profiling]
    profile_requests: True


Then start the dev app server with 'make run', and use curl or wget to make *one* request to the URL you want:
    $ make run

    $ curl -k https://launchpad.dev/

$ kcachegrind 2010-07-20_10\:01\:46.680-RootObject\:index.html-OOPS-1662X1-Dummy-2.prof

Full instructions are here: https://dev.launchpad.net/Debugging.

For other teams that want to see how we hooked this feature into Zope, here is the patch: http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/11157
We don't have the magic '++profile++' URL on-demand profiling working yet.  That 
will come later.  Contributions towards it are welcome, feel free to ping me on 
IRC for the details.

Maris



Follow ups