WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
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
wrench::BandwidthMeterService::kill
void kill()
Kill the bandwidth meter (brutally terminate the daemon)
Definition: BandwidthMeterService.cpp:74
wrench::BandwidthMeterService
A service that measures and records bandwidth usage on a set of links at regular time intervals.
Definition: BandwidthMeterService.h:22
wrench
Definition: Action.cpp:28
wrench::BandwidthMeterService::BandwidthMeterService
BandwidthMeterService(std::string hostname, const std::vector< std::string > &linknames, double period)
Constructor.
Definition: BandwidthMeterService.cpp:52
wrench::BandwidthMeterService::stop
void stop() override
Stop the bandwidth meter.
Definition: BandwidthMeterService.cpp:84
wrench::S4U_Daemon::hostname
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:60
wrench::Service
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:31