EnergyMeterService.h
1 
11 #ifndef WRENCH_ENERGYMETERSERVICE_H
12 #define WRENCH_ENERGYMETERSERVICE_H
13 
14 #include "wrench/services/Service.h"
15 
16 namespace wrench {
17 
18  class WMS;
19 
23  class EnergyMeterService : public Service {
24 
25  public:
26 
27  EnergyMeterService(std::string hostname, const std::vector<std::string> &hostnames, double period);
28  EnergyMeterService(std::string hostname, const std::map<std::string, double> &measurement_periods);
29 
30  /***********************/
32  /***********************/
33  void stop() override;
34  void kill();
35  /***********************/
37  /***********************/
38 
39 
40  private:
41  int main() override;
42  bool processNextMessage(double timeout);
43 
44  std::map<std::string, double> measurement_periods;
45  std::map<std::string, double> time_to_next_measurement;
46 
47  };
48 
49 };
50 
51 
52 #endif //WRENCH_ENERGYMETERSERVICE_H
EnergyMeterService(std::string hostname, const std::vector< std::string > &hostnames, double period)
Constructor.
Definition: EnergyMeterService.cpp:55
void kill()
Kill the energy meter (brutally terminate the daemon)
Definition: EnergyMeterService.cpp:78
void stop() override
Stop the energy meter.
Definition: EnergyMeterService.cpp:88
Definition: Alarm.cpp:20
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:51
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
A service that measures and records energy consumption on a set of hosts at regular time intervals.
Definition: EnergyMeterService.h:23