Belle II Software light-2406-ragdoll
|
Python interface for ProcessStatistics. More...
#include <ProcessStatisticsPython.h>
Public Member Functions | |
ProcessStatisticsPython (ModuleStatistics::EStatisticCounters type=ModuleStatistics::c_Event, const std::vector< ModuleStatistics > &modules={}) | |
Construct a new object to show statistics for a given call type. | |
ProcessStatisticsPython (const ProcessStatisticsPython &)=default | |
Default copy constructor. | |
ProcessStatisticsPython & | operator= (const ProcessStatisticsPython &)=default |
Default assignment operator. | |
~ProcessStatisticsPython ()=default | |
Default destructor. | |
ProcessStatistics * | getWrapped () |
Get wrapped ProcessStatistics object. | |
std::string | getStatisticsString () |
Return string with statistics for all selected modules. | |
std::string | getStatisticsStringHTML () |
Return string with statistics for all selected modules as html table. | |
ProcessStatisticsPython | getModuleStatistics (ModuleStatistics::EStatisticCounters type, const boost::python::list &modulesPyList) |
Get a new statistics object for a different counter/different list of modules. | |
const ModuleStatistics * | get (const std::shared_ptr< Module > &module) |
Get statistics for given module. | |
const ModuleStatistics * | getGlobal () |
Get statistics for the framework itself. | |
boost::python::list | getAll () |
Get statistics for all modules as python list. | |
void | clear () |
Clear collected statistics but keep names of modules. | |
Static Public Member Functions | |
static void | exposePythonAPI () |
Define python wrappers to make functionality avaiable in python. | |
Private Attributes | |
ModuleStatistics::EStatisticCounters | m_type {ModuleStatistics::c_Event} |
Which counter to show when printing the statistics. | |
std::vector< ModuleStatistics > | m_modules |
Which modules to show. | |
Python interface for ProcessStatistics.
Since ProcessStatistics itself resides in the data store, this wraps around it to export some functionality to python.
Definition at line 31 of file ProcessStatisticsPython.h.
|
inline |
Construct a new object to show statistics for a given call type.
Possibly also restricting the list of modules to be shown
Definition at line 34 of file ProcessStatisticsPython.h.
void clear | ( | ) |
Clear collected statistics but keep names of modules.
Definition at line 89 of file ProcessStatisticsPython.cc.
|
static |
Define python wrappers to make functionality avaiable in python.
Definition at line 97 of file ProcessStatisticsPython.cc.
const ModuleStatistics * get | ( | const std::shared_ptr< Module > & | module | ) |
Get statistics for given module.
Definition at line 75 of file ProcessStatisticsPython.cc.
boost::python::list getAll | ( | ) |
Get statistics for all modules as python list.
Definition at line 64 of file ProcessStatisticsPython.cc.
const ModuleStatistics * getGlobal | ( | ) |
Get statistics for the framework itself.
Definition at line 82 of file ProcessStatisticsPython.cc.
ProcessStatisticsPython getModuleStatistics | ( | ModuleStatistics::EStatisticCounters | type, |
const boost::python::list & | modulesPyList | ||
) |
Get a new statistics object for a different counter/different list of modules.
Definition at line 47 of file ProcessStatisticsPython.cc.
string getStatisticsString | ( | ) |
Return string with statistics for all selected modules.
If none are selected show all modules
Can be used in steering file with 'print(statistics)'.
Definition at line 33 of file ProcessStatisticsPython.cc.
string getStatisticsStringHTML | ( | ) |
Return string with statistics for all selected modules as html table.
If none are selected show all modules
Is used in Jupyter notebooks
Definition at line 40 of file ProcessStatisticsPython.cc.
ProcessStatistics * getWrapped | ( | ) |
Get wrapped ProcessStatistics object.
Definition at line 21 of file ProcessStatisticsPython.cc.
|
private |
Which modules to show.
If empty, show all modules
Definition at line 83 of file ProcessStatisticsPython.h.
|
private |
Which counter to show when printing the statistics.
Definition at line 81 of file ProcessStatisticsPython.h.