Profiling
Profile test execution using hotshot.
This plugin implements startTestRun() and replaces
event.executeTests with hotshot.Profile.runcall(). It
implements beforeSummaryReport() to output profiling information
before the final test summary time. Config file options filename,
sort and restrict can be used to change where profiling
information is saved and how it is presented.
Configuration [profiler]
-
always-on
Default : | False |
Type : | boolean |
-
filename
-
-
restrict
-
-
sort
Default : | cumulative |
Type : | str |
Sample configuration
The default configuration is equivalent to including the following in a unittest.cfg file.
[profiler]
always-on = False
filename =
restrict =
sort = cumulative
Command-line options
-
-P DEFAULT, --profile DEFAULT
Run tests under profiler
Plugin class reference: Profiler
-
class nose2.plugins.prof.Profiler[source]
Profile the test run
-
beforeSummaryReport(event)[source]
Output profiling results
-
register()[source]
Don’t register if hotshot is not found
-
startTestRun(event)[source]
Set up the profiler