7 #ifndef _STATISTICS_FUNCTIONS_HEADER_
8 #define _STATISTICS_FUNCTIONS_HEADER_
54 const tChar* strIntMask=
nullptr,
55 const tChar* strFloatMask=
nullptr);
69 const tChar* strIntMask=
nullptr,
70 const tChar* strFloatMask=
nullptr);
110 #define __a_util_declare_statistics(id) static A_UTILS_NS::cStatistics _g_local_Statistics(id)
115 #define __declare_statistics(id) __a_util_declare_statistics(id)
121 #define __a_util_reset_statistics _g_local_Statistics.Reset()
126 #define __reset_statistics __a_util_reset_statistics
132 #define __a_util_update_statistics _g_local_Statistics.Update()
137 #define __update_statistics __a_util_update_statistics
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
tInt64 tTimeStamp
type definition for a time value.
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
double tFloat64
type definition for Float64 (64bit double values) (platform and compiler independent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
tBool IsUpdated()
Whether or not events have already occured.
tTimeStamp m_nElapsed
Elapsed microseconds.
tTimeStamp m_nLogDelay
The update rate at which statistics should be printed.
cStatistics()
Default constructor.
tInt m_nUpdates
Number of updates.
tBool m_bUpdated
"Dirty" flag
cString m_strIdentifier
Statistics identifier.
tInt m_nCounter
Internal counter.
tFloat64 m_fUpdateRate
Updates per second.
tVoid Update(tInt nCount=1)
Adds new events to the object.
tFloat64 GetFloatValue()
Returns the update rate.
cStatistics(const tChar *strIdentifier, tInt nLogDelay=5000, const tChar *strIntMask=nullptr, const tChar *strFloatMask=nullptr)
Creates a new statistics object.
cString m_strFloatMask
Printf-style format specification for floating-point values.
tVoid Init(const tChar *strIdentifier, tInt nLogDelay=5000, const tChar *strIntMask=nullptr, const tChar *strFloatMask=nullptr)
(Re)initializes a statistics object.
tTimeStamp m_nLastLogTime
The last time the statistics were logged.
tVoid Reset()
Resets all statistics.
cString m_strIntMask
Printf-style format specification for integer values.
tTimeStamp m_nLastUpdateTime
The last time the statistics were updated.
tInt GetIntValue()
Returns the number of recorded events.
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.