![]() |
Belle II Software development
|
Public Member Functions | |
| __init__ (self, module, output_file_name=None) | |
| initialize (self) | |
| event (self) | |
| terminate (self) | |
| wrapper_name (self) | |
| param (self) | |
| available_params (self) | |
| compose_wrapped_module_name (self, module) | |
| get_name (self) | |
| beginRun (self) | |
| endRun (self) | |
Public Attributes | |
| str | output_file_name = self.default_output_file_name |
| The output file name the results will be written into. | |
| profiler = cProfile.Profile() | |
| The used profiler instance. | |
| module = module | |
| The wrapped module. | |
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 interpreter 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.
| __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).
Definition at line 131 of file metamodules.py.
|
inherited |
Forwards the available parameters
Definition at line 78 of file metamodules.py.
|
inherited |
Begin run method of the module
Definition at line 94 of file metamodules.py.
|
inherited |
Compose a name that indicates the wrapped module.
Definition at line 82 of file metamodules.py.
|
inherited |
End run method of the module
Definition at line 102 of file metamodules.py.
| event | ( | self | ) |
Event method of the module
Reimplemented from WrapperModule.
Definition at line 148 of file metamodules.py.
|
inherited |
Forwards the name().
Definition at line 86 of file metamodules.py.
| initialize | ( | self | ) |
Initialize method of the module
Reimplemented from WrapperModule.
Definition at line 142 of file metamodules.py.
|
inherited |
Forwards the parameters
Definition at line 73 of file metamodules.py.
| terminate | ( | self | ) |
Terminate method of the module
Reimplemented from WrapperModule.
Definition at line 155 of file metamodules.py.
|
inherited |
Name of the wrapper class.
Definition at line 68 of file metamodules.py.
|
static |
The default name for output if none is given.
Definition at line 129 of file metamodules.py.
|
inherited |
The wrapped module.
Definition at line 53 of file metamodules.py.
| output_file_name = self.default_output_file_name |
The output file name the results will be written into.
Definition at line 137 of file metamodules.py.
| profiler = cProfile.Profile() |
The used profiler instance.
Definition at line 145 of file metamodules.py.