EnergyMeter.h
1 
11 #ifndef WRENCH_ENERGYMETER_H
12 #define WRENCH_ENERGYMETER_H
13 
14 #include "wrench/services/Service.h"
15 
16 namespace wrench {
17 
18  class WMS;
19 
20  class EnergyMeter : public Service {
21 
22  public:
23 
24  void stop();
25  void kill();
26 
27  protected:
28 
29  friend class WMS;
30 
31  EnergyMeter(WMS *wms, const std::map<std::string, double> &measurement_periods);
32  EnergyMeter(WMS *wms, const std::vector<std::string> &hostnames, double period);
33 
34 
35  private:
36  int main();
37  bool processNextMessage(double timeout);
38 
39 
40  // Relevant WMS
41  WMS *wms;
42 
43  std::map<std::string, double> measurement_periods;
44  std::map<std::string, double> time_to_next_measurement;
45 
46  };
47 
48 };
49 
50 
51 #endif //WRENCH_ENERGYMETER_H
EnergyMeter(WMS *wms, const std::map< std::string, double > &measurement_periods)
Constructor.
Definition: EnergyMeter.cpp:27
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
void kill()
Kill the energy meter (brutally terminate the daemon)
Definition: EnergyMeter.cpp:80
void stop()
Stop the energy meter.
Definition: EnergyMeter.cpp:90
Definition: EnergyMeter.h:20
A workflow management system (WMS)
Definition: WMS.h:33
Definition: TerminalOutput.cpp:15