PhoenixSwarm  5.1.1
Library to ease communication between daemons
Loading...
Searching...
No Matches
Monitoring.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Thibaut Oprinsen
3 Mail : thibaut.oprinsen@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __Monitoring_H__
8#define __Monitoring_H__
9
10#include "Representation.h"
11#include "Daemon.h"
12#include "PUncastableBool.h"
14
15typedef std::map<PString, Swarm::Stat> MapDaemonStat;
16
18template<class _TBackend>
19class Swarm::Monitoring : public Swarm::Daemon<_TBackend>{
20 public:
21 Monitoring();
22 virtual ~Monitoring();
23
24 const MapDaemonStat& getMapDaemonStat() const;
25 bool hasReceivedStats() const;
26 size_t getStatsCount() const;
27 PUncastableBool fillStatInfo(const Swarm::Stat & stat);
28 bool processEvent();
29 virtual void addCallMethod();
30 bool extraLoad(const ConfigNode * config);
31
32 size_t getStatBufferDurationSecond() const;
33 size_t getStatBinDurationSecond() const;
34 private:
42};
43
44#include "Monitoring_impl.h"
45
46#endif
std::map< PString, Swarm::Stat > MapDaemonStat
Definition Monitoring.h:15
Class which describes a Daemon with connections to other daemons.
Definition Daemon.h:17
Daemon which manages statistics of a full swarm.
Definition Monitoring.h:19
Monitoring()
Constructor of Monitoring.
size_t getStatBinDurationSecond() const
Get the duration of a bin in seconds for the histogram of the statistics.
bool extraLoad(const ConfigNode *config)
Override for loading extra parameters for the Monitoring.
size_t p_statBufferDuration
Buffer duration in seconds for the statistics accumulation period.
Definition Monitoring.h:37
bool hasReceivedStats() const
Check if stats have been received.
size_t p_binDuration
Duration of a bin in seconds for stat accumulation.
Definition Monitoring.h:39
const MapDaemonStat & getMapDaemonStat() const
Get the map of Stat.
virtual ~Monitoring()
Destructor of Monitoring.
PUncastableBool fillStatInfo(const Swarm::Stat &stat)
Fill the StatInfo of the Monitoring with the given Stat.
size_t getStatsCount() const
Get the count of stats received.
virtual void addCallMethod()
Method from BaseDaemon to add call methods.
void initializeMonitoring()
Initialize the Monitoring.
MapDaemonStat p_mapDaemonStat
Statistics about all Daemon in the swarm.
Definition Monitoring.h:41
size_t getStatBufferDurationSecond() const
Get the buffer duration in seconds for the statistics accumulation period.
bool processEvent()
Process event.
Statistics of a Daemon.