-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maris Fogels wrote:
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
This is a neat start. Obviously ++profile++ even on some sort of staging
would be more useful just because of the size of data. Anyway, how does
it know what directory to dump the profile to? Just wherever 'make run'
was issued?
John
=:->