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.
Load this plugin by running nose2 with the –plugin=nose2.plugins.prof option and activate it with the –profile option,or put the corresponding entries (plugin and always_on) in the respective sections of the configuration file.
Configuration [profiler]¶
-
always-on¶ Default: False Type: boolean
-
filename¶ Default: Type: str
-
restrict¶ Default: [] Type: list
-
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