PhoenixSwarm  5.1.1
Library to ease communication between daemons
Loading...
Searching...
No Matches
Swarm::DaemonStatAccumulator Class Reference

Accumulator of all events occurence on a Daemon (processing functions and communication latencies) to build swarm statistics over a time period. More...

#include <Representation.h>

Public Member Functions

 DaemonStatAccumulator ()
 Constructor of class DaemonStatAccumulator.
 
 DaemonStatAccumulator (const DaemonStatAccumulator &other)
 Copy Constructor of class DaemonStatAccumulator.
 
std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > & getMapStatCommunication ()
 Gets the mapStatCommunication of the DaemonStatAccumulator.
 
const std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > & getMapStatCommunication () const
 Gets the mapStatCommunication of the DaemonStatAccumulator.
 
std::map< PString, Swarm::StatAccumulator > & getMapStatComputing ()
 Gets the mapStatComputing of the DaemonStatAccumulator.
 
const std::map< PString, Swarm::StatAccumulator > & getMapStatComputing () const
 Gets the mapStatComputing of the DaemonStatAccumulator.
 
DaemonStatAccumulatoroperator= (const DaemonStatAccumulator &other)
 Operator = of class DaemonStatAccumulator.
 
template<typename Stream, DataStreamMode::DataStreamMode Mode>
bool readWriteStream (Stream &ds)
 Load the current DaemonStatAccumulator with a stream.
 
void setMapStatCommunication (const std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > &mapStatCommunication)
 Sets the mapStatCommunication of the DaemonStatAccumulator.
 
void setMapStatComputing (const std::map< PString, Swarm::StatAccumulator > &mapStatComputing)
 Sets the mapStatComputing of the DaemonStatAccumulator.
 
virtual ~DaemonStatAccumulator ()
 Destructor of class DaemonStatAccumulator.
 

Protected Member Functions

void copyDaemonStatAccumulator (const DaemonStatAccumulator &other)
 Copy Function of class DaemonStatAccumulator.
 

Private Member Functions

void initialisationDaemonStatAccumulator ()
 Initialisation Function of class DaemonStatAccumulator.
 

Private Attributes

std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > p_mapStatCommunication
 Map of the communication statistics (key: destination daemon name, value: {key: data type, value: vector of associated stats })
 
std::map< PString, Swarm::StatAccumulatorp_mapStatComputing
 Map of the computing statistics (key: stat name, value vector of stat)
 

Detailed Description

Accumulator of all events occurence on a Daemon (processing functions and communication latencies) to build swarm statistics over a time period.

Definition at line 538 of file Representation.h.

Constructor & Destructor Documentation

◆ DaemonStatAccumulator() [1/2]

DaemonStatAccumulator::DaemonStatAccumulator ( )

Constructor of class DaemonStatAccumulator.

Definition at line 1246 of file Representation.cpp.

1246 {
1248}
void initialisationDaemonStatAccumulator()
Initialisation Function of class DaemonStatAccumulator.

References initialisationDaemonStatAccumulator().

Referenced by copyDaemonStatAccumulator(), DaemonStatAccumulator(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~DaemonStatAccumulator()

DaemonStatAccumulator::~DaemonStatAccumulator ( )
virtual

Destructor of class DaemonStatAccumulator.

Definition at line 1251 of file Representation.cpp.

1251 {
1252
1253}

◆ DaemonStatAccumulator() [2/2]

DaemonStatAccumulator::DaemonStatAccumulator ( const DaemonStatAccumulator & other)

Copy Constructor of class DaemonStatAccumulator.

Parameters
other: DaemonStatAccumulator we want ot copy

Definition at line 1258 of file Representation.cpp.

1258 {
1260}
void copyDaemonStatAccumulator(const DaemonStatAccumulator &other)
Copy Function of class DaemonStatAccumulator.

References copyDaemonStatAccumulator(), and DaemonStatAccumulator().

+ Here is the call graph for this function:

Member Function Documentation

◆ copyDaemonStatAccumulator()

void DaemonStatAccumulator::copyDaemonStatAccumulator ( const DaemonStatAccumulator & other)
protected

Copy Function of class DaemonStatAccumulator.

Parameters
other: DaemonStatAccumulator we want ot copy

Definition at line 1316 of file Representation.cpp.

1316 {
1319}
std::map< PString, Swarm::StatAccumulator > p_mapStatComputing
Map of the computing statistics (key: stat name, value vector of stat)
std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > p_mapStatCommunication
Map of the communication statistics (key: destination daemon name, value: {key: data type,...

References DaemonStatAccumulator(), p_mapStatCommunication, and p_mapStatComputing.

Referenced by DaemonStatAccumulator(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMapStatCommunication() [1/2]

std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > & DaemonStatAccumulator::getMapStatCommunication ( )

Gets the mapStatCommunication of the DaemonStatAccumulator.

Returns
mapStatCommunication of the DaemonStatAccumulator

Definition at line 1309 of file Representation.cpp.

1309 {
1311}

References p_mapStatCommunication.

◆ getMapStatCommunication() [2/2]

const std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > & DaemonStatAccumulator::getMapStatCommunication ( ) const

Gets the mapStatCommunication of the DaemonStatAccumulator.

Returns
mapStatCommunication of the DaemonStatAccumulator

Definition at line 1302 of file Representation.cpp.

1302 {
1304}

References p_mapStatCommunication.

Referenced by CheckStream< Swarm::DaemonStatAccumulator >::check_stream(), testClearStatAccumulator(), and testFillDaemonStat().

+ Here is the caller graph for this function:

◆ getMapStatComputing() [1/2]

std::map< PString, Swarm::StatAccumulator > & DaemonStatAccumulator::getMapStatComputing ( )

Gets the mapStatComputing of the DaemonStatAccumulator.

Returns
mapStatComputing of the DaemonStatAccumulator

Definition at line 1295 of file Representation.cpp.

1295 {
1296 return p_mapStatComputing;
1297}

References p_mapStatComputing.

◆ getMapStatComputing() [2/2]

const std::map< PString, Swarm::StatAccumulator > & DaemonStatAccumulator::getMapStatComputing ( ) const

Gets the mapStatComputing of the DaemonStatAccumulator.

Returns
mapStatComputing of the DaemonStatAccumulator

Definition at line 1288 of file Representation.cpp.

1288 {
1289 return p_mapStatComputing;
1290}

References p_mapStatComputing.

Referenced by CheckStream< Swarm::DaemonStatAccumulator >::check_stream(), testClearStatAccumulator(), and testFillDaemonStat().

+ Here is the caller graph for this function:

◆ initialisationDaemonStatAccumulator()

void DaemonStatAccumulator::initialisationDaemonStatAccumulator ( )
private

Initialisation Function of class DaemonStatAccumulator.

Definition at line 1322 of file Representation.cpp.

1322 {
1323}

Referenced by DaemonStatAccumulator().

+ Here is the caller graph for this function:

◆ operator=()

DaemonStatAccumulator & DaemonStatAccumulator::operator= ( const DaemonStatAccumulator & other)

Operator = of class DaemonStatAccumulator.

Parameters
other: DaemonStatAccumulator we want ot copy
Returns
copied class DaemonStatAccumulator

Definition at line 1266 of file Representation.cpp.

1266 {
1268 return *this;
1269}

References copyDaemonStatAccumulator(), and DaemonStatAccumulator().

+ Here is the call graph for this function:

◆ readWriteStream()

template<typename Stream, DataStreamMode::DataStreamMode Mode>
bool Swarm::DaemonStatAccumulator::readWriteStream ( Stream & ds)
inline

Load the current DaemonStatAccumulator with a stream.

Parameters
[out]ds: stream to be used
Returns
true on success, false otherwise

Definition at line 556 of file Representation.h.

556 {
557 bool b(true);
558 b &= DataStream<Stream, Mode, std::map<PString, Swarm::StatAccumulator > >::data_stream(ds, p_mapStatComputing);
559 b &= DataStream<Stream, Mode, std::map<DaemonName, std::map<DataType, Swarm::StatAccumulator > > >::data_stream(ds, p_mapStatCommunication);
560 return b;
561 }

References p_mapStatCommunication, and p_mapStatComputing.

Referenced by DataStream< Stream, Mode, Swarm::DaemonStatAccumulator >::data_stream().

+ Here is the caller graph for this function:

◆ setMapStatCommunication()

void DaemonStatAccumulator::setMapStatCommunication ( const std::map< DaemonName, std::map< DataType, Swarm::StatAccumulator > > & mapStatCommunication)

Sets the mapStatCommunication of the DaemonStatAccumulator.

Parameters
mapStatCommunication: mapStatCommunication of the DaemonStatAccumulator

Definition at line 1281 of file Representation.cpp.

1281 {
1282 p_mapStatCommunication = mapStatCommunication;
1283}

References p_mapStatCommunication.

◆ setMapStatComputing()

void DaemonStatAccumulator::setMapStatComputing ( const std::map< PString, Swarm::StatAccumulator > & mapStatComputing)

Sets the mapStatComputing of the DaemonStatAccumulator.

Parameters
mapStatComputing: mapStatComputing of the DaemonStatAccumulator

Definition at line 1274 of file Representation.cpp.

1274 {
1275 p_mapStatComputing = mapStatComputing;
1276}

References p_mapStatComputing.

Member Data Documentation

◆ p_mapStatCommunication

std::map<DaemonName, std::map<DataType, Swarm::StatAccumulator > > Swarm::DaemonStatAccumulator::p_mapStatCommunication
private

Map of the communication statistics (key: destination daemon name, value: {key: data type, value: vector of associated stats })

Definition at line 570 of file Representation.h.

Referenced by copyDaemonStatAccumulator(), getMapStatCommunication(), getMapStatCommunication(), readWriteStream(), and setMapStatCommunication().

◆ p_mapStatComputing

std::map<PString, Swarm::StatAccumulator > Swarm::DaemonStatAccumulator::p_mapStatComputing
private

Map of the computing statistics (key: stat name, value vector of stat)

Definition at line 568 of file Representation.h.

Referenced by copyDaemonStatAccumulator(), getMapStatComputing(), getMapStatComputing(), readWriteStream(), and setMapStatComputing().


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