BandwidthMeterService.h
1 
10 #ifndef WRENCH_BANDWIDTHMETERSERVICE_H
11 #define WRENCH_BANDWIDTHMETERSERVICE_H
12 
13 #include "wrench/services/Service.h"
14 
15 namespace wrench {
16 
17  class WMS;
18 
22  class BandwidthMeterService : public Service {
23  public:
24  BandwidthMeterService(std::string hostname, const std::vector<std::string> &linknames, double period);
25  BandwidthMeterService(std::string hostname, const std::map<std::string, double> &measurement_periods);
26 
27  /***********************/
29  /***********************/
30  void stop() override;
31  void kill();
32  /***********************/
34  /***********************/
35 
36 
37  private:
38  int main() override;
39  bool processNextMessage(double timeout);
40 
41  std::map<std::string, double> measurement_periods;
42  std::map<std::string, double> time_to_next_measurement;
43  };
44 }
45 
46 #endif //WRENCH_BANDWIDTHMETERSERVICE_H
void kill()
Kill the bandwidth meter (brutally terminate the daemon)
Definition: BandwidthMeterService.cpp:75
A service that measures and records bandwidth usage on a set of links at regular time intervals.
Definition: BandwidthMeterService.h:22
Definition: Alarm.cpp:20
BandwidthMeterService(std::string hostname, const std::vector< std::string > &linknames, double period)
Constructor.
Definition: BandwidthMeterService.cpp:53
void stop() override
Stop the bandwidth meter.
Definition: BandwidthMeterService.cpp:85
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