Requirements
Your application needs to run under apache / mod_python. Here is a simple config: You don't use:PythonHandler django.core.handlers.modpython
Instead:
PythonHandler django.core.handlers.profiler-hotshot
By default logs are saved to /var/log/cmsprofile and the folder must exists and apache hast to have write permissions on it. Now when you call a page of your django project a log file will be generated there (hidden file - starts with a dot). To make those files useful we will use KCachegrind.
Using Kcachegrind
kcachegrind is a KDE application for profilers logs visualisation. To use Kcachegrind we need to convert hotshot logs using one of kcachegrind helpers:hotshot2calltree file.prof > cachegrind.out.01
hotshot2calltree will generate a log file that can be used in kcachegrind:
hotshot for scripts
It's very simple, like this: *prof file needs to be converted in the same way.- Added: 14.07.2008 by riklaunim