 |
Belle II Software
release-05-02-19
|
13 #include <framework/utilities/CalcMeanCov.h>
28 class ModuleStatistics {
133 for (
auto& stat :
m_stats) stat.clear();
bool operator!=(const ModuleStatistics &other) const
inequality.
int m_index
display index of the module
value_type getCorrelation(int i, int j) const
Return the correlation coefficient between parameters i and j.
void add(T... values)
Update mean and covariance by adding a new entry.
@ c_Event
Counting time/calls in event()
@ c_EndRun
Counting time/calls in endRun()
value_type getEntries() const
Return the number of entries.
EStatisticCounters
Enum to define all counter types.
value_type getMemorySum(EStatisticCounters type=c_Total) const
return the total used memory for a given counter
ModuleStatistics(const std::string &name="")
Construct with a given name.
void clear()
Clear all statistics.
void update(const ModuleStatistics &other)
Add statistics for each category.
CalcMeanCov< 2, value_type > m_stats[c_Total+1]
array with mean/covariance for all counters
std::string m_name
name of module
@ c_Term
Counting time/calls in terminate()
@ c_Total
Sum of the above.
value_type getMean(int i) const
Return the mean for parameter i.
value_type getMemoryStddev(EStatisticCounters type=c_Total) const
return the stddev of the memory consumption changes per call
const std::string & getName() const
Return the previously set name.
void setIndex(int index)
Set the index of the module when displaying statistics.
void setName(const std::string &name)
Set the name of the module for display.
Abstract base class for different kinds of events.
void add(EStatisticCounters type, value_type time, value_type memory)
Add a time and memory measurment to the counter of a given type.
int getIndex() const
Return the index.
value_type getMemoryMean(EStatisticCounters type=c_Total) const
return the average memory change per call
value_type getSum(int i) const
Return the weighted sum values for parameter i.
double value_type
type of float variable to use for calculations and storage
@ c_BeginRun
Counting time/calls in beginRun()
bool operator==(const ModuleStatistics &other) const
Check if name is identical.
value_type getStddev(int i) const
Return the standard deviation for parameter i.
value_type getTimeMemoryCorrelation(EStatisticCounters type=c_Total) const
return the pearson correlation coefficient between execution times and memory consumption changes
value_type getCalls(EStatisticCounters type=c_Total) const
return the number of calls for a given counter type
value_type getTimeMean(EStatisticCounters type=c_Total) const
return the mean execution time for a given counter
value_type getTimeStddev(EStatisticCounters type=c_Total) const
return the stddev of the execution times for a given counter
value_type getTimeSum(EStatisticCounters type=c_Total) const
return the sum of all execution times for a given counter
Keep track of time and memory consumption during processing.
@ c_Init
Counting time/calls in initialize()