Home | Trees | Indices | Help |
|
---|
|
Helper module to enable profiling of the testcase
If environment variable PROFILELEVEL is set it uses hotshot profiler for unittest.main() call. Value of PROFILELEVEL defines number of top busy functions to report.
Environment variable PROFILELINES=1 makes hotshot store information per each line, so it could be easily inspected later on.
kcachegrind provides nice interactive GUI to inspect profiler results. If PROFILELINES was set to 1, it provides information per each line.
To convert .prof file into a file suitable for kcachegrind, use utility hotshot2calltree which comes in package kcachegrind-converters.
Example:
# profile and output 3 most expensive function calls PROFILELEVEL=3 PROFILELINES=1 PYTHONPATH=../ python test_searchlight.py # convert to kcachegrind format hotshot2calltree -o test_searchlight.py.kcache test_searchlight.py.prof # inspect kcachegrind test_searchlight.py.kcache
|
|||
TestProgramPyMVPA |
Imports: unittest, sys, environ, _random_seed, hotshot
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:14 2012 | http://epydoc.sourceforge.net |