ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
test::Statistic Class Reference

#include <Statistic.hpp>

Inheritance diagram for test::Statistic:
Inheritance graph
[legend]
Collaboration diagram for test::Statistic:
Collaboration graph
[legend]

Public Member Functions

 Statistic ()
 
void initTime () noexcept(false)
 
Millisecond getInitTime () const
 
int getMessageCounter () const
 
int getSuccessCounter () const
 
void countMessage ()
 
void countSuccess ()
 
int countError () noexcept(false)
 
void resetError () noexcept(false)
 
void countDelay (const Millisecond value) noexcept(false)
 
const Average< Microsecond > & getAvgDelay () const
 
int getMessage () const
 
- Public Member Functions inherited from anna::Mutex
 Mutex (const Mode::_v mode=Mode::Recursive)
 
virtual ~Mutex ()
 
virtual void lock () noexcept(false)
 
virtual void unlock ()
 
bool trylock () noexcept(false)
 
 operator const pthread_mutex_t * () const
 

Additional Inherited Members

- Protected Member Functions inherited from anna::Safe
 Safe ()
 

Constructor & Destructor Documentation

◆ Statistic()

test::Statistic::Statistic ( )
inline
24  :
25  a_messageCounter (0),
26  a_successCounter (0),
27  a_initTime (0),
28  a_avgDelay ("AvgDelay"),
29  a_errorCounter (0)
30  {}

Member Function Documentation

◆ countDelay()

void test::Statistic::countDelay ( const Millisecond  value)
inlinenoexcept
57  {
58  Guard guard (this, "Statistic::countDelay");
59  a_avgDelay += value;
60  }
Definition: Guard.hpp:35

◆ countError()

int test::Statistic::countError ( )
inlinenoexcept
46  {
47  Guard guard (this, "Statistic::countError");
48  return ++ a_errorCounter;
49  }
Definition: Guard.hpp:35

◆ countMessage()

void test::Statistic::countMessage ( )
inline
44 { a_messageCounter ++; }

◆ countSuccess()

void test::Statistic::countSuccess ( )
inline
45 { a_successCounter ++; }

◆ getAvgDelay()

const Average<Microsecond>& test::Statistic::getAvgDelay ( ) const
inline
62 { return a_avgDelay; }

◆ getInitTime()

Millisecond test::Statistic::getInitTime ( ) const
inline
40 { return a_initTime; }

◆ getMessage()

int test::Statistic::getMessage ( ) const
inline
64 { return a_messageCounter; }

◆ getMessageCounter()

int test::Statistic::getMessageCounter ( ) const
inline
41 { return a_messageCounter; }

◆ getSuccessCounter()

int test::Statistic::getSuccessCounter ( ) const
inline
42 { return a_successCounter; }

◆ initTime()

void test::Statistic::initTime ( )
inlinenoexcept
32  {
33  if (a_initTime == 0) {
34  Guard guard (this, "Statistic::initTime");
35  if (a_initTime == 0)
36  a_initTime = anna::functions::millisecond ();
37  }
38  }
static Millisecond millisecond()
Definition: functions.hpp:379
Definition: Guard.hpp:35
Here is the call graph for this function:

◆ resetError()

void test::Statistic::resetError ( )
inlinenoexcept
50  {
51  if (a_errorCounter > 0) {
52  Guard guard (this, "Statistic::countError");
53  a_errorCounter = 0;
54  }
55  }
Definition: Guard.hpp:35

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