6#ifndef __Monitoring_IMPL_H__
7#define __Monitoring_IMPL_H__
15template<
class _TBackend>
23template<
class _TBackend>
31template<
class _TBackend>
39template<
class _TBackend>
47template<
class _TBackend>
55template<
class _TBackend>
63template<
class _TBackend>
72template<
class _TBackend>
75 return UNCASTABLE_TRUE;
82template<
class _TBackend>
84 if(config !=
nullptr){
86 p_binDuration = phoenix_get_value<size_t>(*config,
"bin_duration_second", 5lu);
92template<
class _TBackend>
102template<
class _TBackend>
109template<
class _TBackend>
std::map< PString, Swarm::Stat > MapDaemonStat
PUncastableBool sortFillDaemonStat(Monitoring< _TBackend > &manager, const Swarm::Stat &data)
bool addDataCallableMethod(PUncastableBool(&function)(const _Data &), size_t nbBin, float histLowerBound, float histUpperBound)
Add a callable method of the Daemon.
DaemonConfig & getConfig()
Get the configuration of the current BaseDaemon.
PLog & getLog()
Get the log of the current BaseDaemon.
Describe a Daemon of the Swarm.
size_t getStatNbBin() const
Gets the statNbBin of the DaemonConfig.
float getStatHistLowerBound() const
Gets the statHistLowerBound of the DaemonConfig.
float getStatHistUpperBound() const
Gets the statHistUpperBound of the DaemonConfig.
Daemon()
Default constructor of Daemon.
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.
bool hasReceivedStats() const
Check if stats have been received.
size_t p_binDuration
Duration of a bin in seconds for stat accumulation.
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.
size_t getStatBufferDurationSecond() const
Get the buffer duration in seconds for the statistics accumulation period.
bool processEvent()
Process event.
const PString & getName() const
Gets the name of the Stat.