9#include <framework/modules/profile/StatisticsSummaryModule.h>
11#include <framework/core/ModuleStatistics.h>
12#include <framework/core/ModuleManager.h>
24 setDescription(
"Sums up the statistics of preceeding modules. All modules until the first module or another StatisticsSummary module in the module statistics are included.");
63 const std::string& name = statistics.
getName();
64 const Module* module =
nullptr;
65 for (
const auto& aModule : modules) {
66 if (aModule->getName() == name) {
67 module = aModule.get();
71 if (module && (module->getType() ==
"StatisticsSummary")) {
84 thisStatistics.
add(type, time, memory);
In the store you can park objects that have to be accessed by various modules.
const std::list< std::shared_ptr< Module > > & getCreatedModules() const
Returns a reference to the list of created modules.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
Keep track of time and memory consumption during processing.
const std::string & getName() const
Return the previously set name.
void add(EStatisticCounters type, value_type time, value_type memory)
Add a time and memory measurment to the counter of a given type.
EStatisticCounters
Enum to define all counter types.
@ c_Init
Counting time/calls in initialize()
@ c_EndRun
Counting time/calls in endRun()
@ c_BeginRun
Counting time/calls in beginRun()
@ c_Event
Counting time/calls in event()
value_type getMemorySum(EStatisticCounters type=c_Total) const
return the total used memory for a given counter
value_type getTimeSum(EStatisticCounters type=c_Total) const
return the sum of all execution times for a given counter
double value_type
type of float variable to use for calculations and storage
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_DontCollectStatistics
No statistics is collected for this module.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
virtual void initialize() override
Record initialize statistics sum.
StoreObjPtr< ProcessStatistics > m_processStatistics
process statistics pointer
virtual void event() override
Record event statistics sum.
virtual void endRun() override
Record end run statistics sum.
virtual void beginRun() override
Record begin run statistics sum.
void record(ModuleStatistics::EStatisticCounters type)
Record the statistics of given type.
StatisticsSummaryModule()
Constructor.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.