SST  14.1.0
StructuralSimulationToolkit
SST::Statistics::UniqueCountStatistic< T > Class Template Reference

Creates a Statistic which counts unique values provided to it. More...

#include <statuniquecount.h>

Inheritance diagram for SST::Statistics::UniqueCountStatistic< T >:
SST::Statistics::Statistic< T > SST::Statistics::StatisticBase SST::Statistics::StatisticCollector< T >

Public Member Functions

 SST_ELI_DECLARE_STATISTIC_TEMPLATE (UniqueCountStatistic, "sst", "UniqueCountStatistic", SST_ELI_ELEMENT_VERSION(1, 0, 0), "Track unique occurrences of statistic", "SST::Statistic<T>") UniqueCountStatistic(BaseComponent *comp
 
void serialize_order (SST::Core::Serialization::serializer &ser) override
 Serialization.
 
- Public Member Functions inherited from SST::Statistics::Statistic< T >
 SST_ELI_DECLARE_INFO (ELI::ProvidesInterface, ELI::ProvidesParams) using Datum
 
template<class... InArgs>
void addData (InArgs &&... args)
 Add data to the Statistic This will call the addData_impl() routine in the derived Statistic.
 
template<class... InArgs>
void addDataNTimes (uint64_t N, InArgs &&... args)
 
- Public Member Functions inherited from SST::Statistics::StatisticBase
void enable ()
 Enable Statistic for collections.
 
void disable ()
 Disable Statistic for collections.
 
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.
 
ParamsgetParams ()
 Return the Statistic Parameters NOTE: This must be public so that it is accessible to the serialize_impl class for statistics.
 

Data Fields

const std::string & statName
 
const std::string const std::string & statSubId
 
const std::string const std::string ParamsstatParams: Statistic<T>(comp
 
const std::string const std::string Params statName
 
const std::string const std::string Params statSubId
 
const std::string const std::string Params statParams
 

Protected Member Functions

void addData_impl (T data) override
 
Present a new value to the Statistic to be included in the unique set More...
 
- Protected Member Functions inherited from SST::Statistics::Statistic< T >
 Statistic (BaseComponent *comp, const std::string &statName, const std::string &statSubId, Params &statParams)
 Construct a Statistic. More...
 
- Protected Member Functions inherited from SST::Statistics::StatisticBase
 StatisticBase (BaseComponent *comp, const std::string &statName, const std::string &statSubId, Params &statParams)
 Construct a StatisticBase. More...
 
void setStatisticDataType (const StatisticFieldInfo::fieldType_t dataType)
 Set the Statistic Data Type.
 
void setStatisticTypeName (const char *typeName)
 Set an optional Statistic Type Name.
 

Additional Inherited Members

- Public Types inherited from SST::Statistics::StatisticBase
enum  StatMode_t { STAT_MODE_UNDEFINED, STAT_MODE_COUNT, STAT_MODE_PERIODIC, STAT_MODE_DUMP_AT_END }
 Statistic collection mode.
 
- Static Public Member Functions inherited from SST::Statistics::Statistic< T >
static fieldType_t fieldId ()
 
- Static Public Member Functions inherited from SST::Statistics::StatisticBase
static const std::vector< ElementInfoParam > & ELI_getParams ()
 

Detailed Description

template<typename T>
class SST::Statistics::UniqueCountStatistic< T >

Creates a Statistic which counts unique values provided to it.

Template Parameters
TA template for holding the main data type of this statistic

Member Function Documentation

◆ addData_impl()

template<typename T >
void SST::Statistics::UniqueCountStatistic< T >::addData_impl ( data)
inlineoverrideprotected


Present a new value to the Statistic to be included in the unique set

Parameters
dataNew data item to be included in the unique set

Field Documentation

◆ statParams

template<typename T >
const std::string const std::string Params SST::Statistics::UniqueCountStatistic< T >::statParams
Initial value:
{
this->setStatisticTypeName("UniqueCount")

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