![]() |
Belle II Software release-09-00-03
|
Public Member Functions | |
| def | __init__ (self, module, output_file_name=None) |
| def | initialize (self) |
| def | event (self) |
| def | terminate (self) |
Public Attributes | |
| output_file_name | |
| The output file name the results will be written into. | |
| profiler | |
| The used profiler instance. | |
Static Public Attributes | |
| str | default_output_file_name = "profile.txt" |
| The default name for output if none is given. | |
Wrapper module that evaluates the computational performance of python modules.
Uses cProfile.
Attributes:
module (basf2.Module): The wrapped module that should be profiled.
Should be a module written in Python, since the profile interacts
with the interpretor for the measurements, but cannot look into c++ implementations.
output_file_name (str, optional): Path to the file where the profiling information
shall be stored. Defaults to profile.txt.
profiler (cProfile.Profile): Profiler instance to manage and extract the profiling statistics.
Definition at line 111 of file metamodules.py.
| def __init__ | ( | self, | |
| module, | |||
output_file_name = None |
|||
| ) |
Create a new PyProfilingModule wrapped around the given module which outputs its results to the output_file_name of given (if not, to profile.txt).
Reimplemented from WrapperModule.
Definition at line 131 of file metamodules.py.
| def event | ( | self | ) |
Event method of the module
Reimplemented from WrapperModule.
Definition at line 148 of file metamodules.py.
| def initialize | ( | self | ) |
Initialize method of the module
Reimplemented from WrapperModule.
Definition at line 142 of file metamodules.py.
| def terminate | ( | self | ) |
Terminate method of the module
Reimplemented from WrapperModule.
Definition at line 155 of file metamodules.py.
|
static |
The default name for output if none is given.
Definition at line 129 of file metamodules.py.
| output_file_name |
The output file name the results will be written into.
Definition at line 137 of file metamodules.py.
| profiler |
The used profiler instance.
Definition at line 145 of file metamodules.py.