SST  11.0.0
StructuralSimulationToolkit
SST::Statistics::StatisticBase Class Referenceabstract

Forms the base class for statistics gathering within SST. More...

#include <statbase.h>

Inheritance diagram for SST::Statistics::StatisticBase:
SST::Statistics::Statistic< T > SST::Statistics::Statistic< void > SST::Statistics::Statistic< BinDataType > SST::Statistics::Statistic< int > SST::Statistics::Statistic< int32_t > SST::Statistics::Statistic< int64_t > SST::Statistics::Statistic< NumberBase > SST::Statistics::Statistic< std::tuple< Args...> > SST::Statistics::Statistic< uint32_t > SST::Statistics::Statistic< uint64_t >

Public Types

enum  StatMode_t { STAT_MODE_UNDEFINED, STAT_MODE_COUNT, STAT_MODE_PERIODIC, STAT_MODE_DUMP_AT_END }
 Statistic collection mode.
 

Public Member Functions

void enable ()
 Enable Statistic for collections.
 
void disable ()
 Disable Statistic for collections.
 
virtual void clearStatisticData ()
 Inform the Statistic to clear its data.
 
virtual void resetCollectionCount ()
 Set the current collection count to 0.
 
virtual void incrementCollectionCount (uint64_t increment)
 Increment current collection count.
 
virtual void setCollectionCount (uint64_t newCount)
 Set the current collection count to a defined value.
 
virtual void setCollectionCountLimit (uint64_t newLimit)
 Set the collection count limit to a defined value.
 
void setFlagResetCountOnOutput (bool flag)
 Set the Reset Count On Output flag. More...
 
void setFlagClearDataOnOutput (bool flag)
 Set the Clear Data On Output flag. More...
 
void setFlagOutputAtEndOfSim (bool flag)
 Set the Output At End Of Sim flag. More...
 
const std::string & getCompName () const
 Return the Component Name.
 
const std::string & getStatName () const
 Return the Statistic Name.
 
const std::string & getStatSubId () const
 Return the Statistic SubId.
 
const std::string & getFullStatName () const
 Return the full Statistic name of Component.StatName.SubId.
 
const std::string & getStatTypeName () const
 Return the Statistic type name.
 
const
StatisticFieldInfo::fieldType_t & 
getStatDataType () const
 Return the Statistic data type.
 
const char * getStatDataTypeShortName () const
 Return the Statistic data type.
 
const char * getStatDataTypeFullName () const
 Return the Statistic data type.
 
BaseComponentgetComponent () const
 Return a pointer to the parent Component.
 
bool isEnabled () const
 Return the enable status of the Statistic.
 
bool isOutputEnabled () const
 Return the enable status of the Statistic's ability to output data.
 
uint64_t getCollectionCountLimit () const
 Return the collection count limit.
 
uint64_t getCollectionCount () const
 Return the current collection count.
 
bool getFlagResetCountOnOutput () const
 Return the ResetCountOnOutput flag value.
 
bool getFlagClearDataOnOutput () const
 Return the ClearDataOnOutput flag value.
 
bool getFlagOutputAtEndOfSim () const
 Return the OutputAtEndOfSim flag value.
 
StatMode_t getRegisteredCollectionMode () const
 Return the collection mode that is registered.
 
void delayOutput (const char *delayTime)
 Delay the statistic from outputting data for a specified delay time. More...
 
void delayCollection (const char *delayTime)
 Delay the statistic from collecting data for a specified delay time. More...
 
virtual bool isReady () const
 Indicate that the Statistic is Ready to be used.
 
virtual bool isNullStatistic () const
 Indicate if the Statistic is a NullStatistic.
 

Static Public Member Functions

static const std::vector
< ElementInfoParam > & 
ELI_getParams ()
 

Protected Member Functions

 StatisticBase (BaseComponent *comp, const std::string &statName, const std::string &statSubId, Params &statParams)
 Construct a StatisticBase. More...
 
ParamsgetParams ()
 Return the Statistic Parameters.
 
void setStatisticDataType (const StatisticFieldInfo::fieldType_t dataType)
 Set the Statistic Data Type.
 
void setStatisticTypeName (const char *typeName)
 Set an optional Statistic Type Name.
 

Friends

class SST::Statistics::StatisticProcessingEngine
 
class SST::Statistics::StatisticOutput
 
class SST::Statistics::StatisticGroup
 
class SST::Statistics::StatisticFieldsOutput
 
class SST::BaseComponent
 

Detailed Description

Forms the base class for statistics gathering within SST.

Statistics are gathered and processed into various (extensible) output forms. Statistics are expected to be named so that they can be located in the simulation output files.

Constructor & Destructor Documentation

SST::Statistics::StatisticBase::StatisticBase ( BaseComponent comp,
const std::string &  statName,
const std::string &  statSubId,
Params statParams 
)
protected

Construct a StatisticBase.

Parameters
comp- Pointer to the parent constructor.
statName- Name of the statistic to be registered. This name must match the name in the ElementInfoStatistic.
statSubId- Additional name of the statistic
statParams- The parameters for this statistic

References SST::Params::find().

Member Function Documentation

void SST::Statistics::StatisticBase::delayCollection ( const char *  delayTime)

Delay the statistic from collecting data for a specified delay time.

Parameters
delayTime- Value in UnitAlgebra format for delay (i.e. 10ns).

References SST::Simulation_impl::getSimulation(), and SST::Simulation_impl::registerOneShot().

void SST::Statistics::StatisticBase::delayOutput ( const char *  delayTime)

Delay the statistic from outputting data for a specified delay time.

Parameters
delayTime- Value in UnitAlgebra format for delay (i.e. 10ns).

References SST::Simulation_impl::getSimulation(), and SST::Simulation_impl::registerOneShot().

void SST::Statistics::StatisticBase::setFlagClearDataOnOutput ( bool  flag)
inline

Set the Clear Data On Output flag.

If Set, the data in the statistic will be cleared by calling clearStatisticData().

void SST::Statistics::StatisticBase::setFlagOutputAtEndOfSim ( bool  flag)
inline

Set the Output At End Of Sim flag.

If Set, the statistic will perform an output at the end of simulation.

void SST::Statistics::StatisticBase::setFlagResetCountOnOutput ( bool  flag)
inline

Set the Reset Count On Output flag.

If Set, the collection count will be reset when statistic is output.


The documentation for this class was generated from the following files: