SimulationTimestampTypes.h
1 
10 #ifndef WRENCH_SIMULATIONTIMESTAMPTYPES_H
11 #define WRENCH_SIMULATIONTIMESTAMPTYPES_H
12 
13 #include "wrench/workflow/WorkflowTask.h"
14 
15 namespace wrench {
16 
17  class WorkflowTask;
18  class StorageService;
19 
24  public:
26  double getDate();
27 
28  private:
29  double date = -0.1;
30  };
31 
36  public:
37  /***********************/
39  /***********************/
42  virtual ~SimulationTimestampPair() {}
43  /***********************/
45  /***********************/
46 
47  virtual SimulationTimestampPair *getEndpoint();
48 
49  protected:
51  SimulationTimestampPair *endpoint = nullptr;
52  };
53 
58 
59  public:
60 
61  /***********************/
63  /***********************/
65  /***********************/
67  /***********************/
68 
69  WorkflowTask *getTask();
70  SimulationTimestampTask *getEndpoint() override;
71 
72  protected:
73  static std::map<std::string, SimulationTimestampTask *> pending_task_timestamps;
74 
75  void setEndpoints();
76 
77  private:
78  WorkflowTask *task;
79  };
80 
85  public:
86  /***********************/
88  /***********************/
90  /***********************/
92  /***********************/
93  };
94 
99  public:
100  /***********************/
102  /***********************/
104  /***********************/
106  /***********************/
107 
108  };
109 
114  public:
115  /***********************/
117  /***********************/
119  /***********************/
121  /***********************/
122  };
123 
128  public:
129  /***********************/
131  /***********************/
133  /***********************/
135  /***********************/
136  };
137 
139  class FileLocation;
140 
145  public:
146 
147  /***********************/
149  /***********************/
150  SimulationTimestampFileCopy(WorkflowFile *file, std::shared_ptr<FileLocation> src, std::shared_ptr<FileLocation> dst, SimulationTimestampFileCopyStart *start_timestamp = nullptr);
151  /***********************/
153  /***********************/
154 
158  SimulationTimestampFileCopy *getEndpoint() override;
159  WorkflowFile *getFile();
160  std::shared_ptr<FileLocation> getSource();
161  std::shared_ptr<FileLocation> getDestination();
162 
163  protected:
168 
172  std::shared_ptr<FileLocation> source;
173 
177  std::shared_ptr<FileLocation> destination;
178  };
179 
182 
187  public:
188  /***********************/
190  /***********************/
191  SimulationTimestampFileCopyStart(WorkflowFile *file, std::shared_ptr<FileLocation> src, std::shared_ptr<FileLocation> dst);
192  /***********************/
194  /***********************/
195 
198  };
199 
204  public:
205  /***********************/
207  /***********************/
209  /***********************/
211  /***********************/
212  };
213 
218  public:
219  /***********************/
221  /***********************/
223  /***********************/
225  /***********************/
226  };
227 
228 
229 
230 
235  public:
236  /***********************/
238  /***********************/
239  SimulationTimestampPstateSet(std::string hostname, int pstate);
240  /***********************/
242  /***********************/
243 
244  std::string getHostname();
245  int getPstate();
246  private:
247  std::string hostname;
248  int pstate;
249  };
250 
255  public:
256  /***********************/
258  /***********************/
259  SimulationTimestampEnergyConsumption(std::string hostname, double joules);
260  /***********************/
262  /***********************/
263 
264  std::string getHostname();
265  double getConsumption();
266 
267  private:
268  std::string hostname;
269  double joules;
270  };
271 };
272 
273 #endif //WRENCH_SIMULATIONTIMESTAMPTYPES_H
A simulation timestamp class for energy consumption.
Definition: SimulationTimestampTypes.h:254
double getDate()
Retrieve the date recorded for this timestamp.
Definition: SimulationTimestampTypes.cpp:18
A computational task in a Workflow.
Definition: WorkflowTask.h:26
std::shared_ptr< FileLocation > destination
The location where the WorkflowFile was being copied to.
Definition: SimulationTimestampTypes.h:177
A simulation timestamp class for WorkflowTask failure times.
Definition: SimulationTimestampTypes.h:98
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
A simulation timestamp class for WorkflowTask termination times.
Definition: SimulationTimestampTypes.h:127
A simulation timestamp class for WorkflowTask start times.
Definition: SimulationTimestampTypes.h:84
std::shared_ptr< FileLocation > source
The location where the WorkflowFile was being copied from.
Definition: SimulationTimestampTypes.h:172
A simulation timestamp class for file copy failure times.
Definition: SimulationTimestampTypes.h:203
A simulation timestamp class for WorkflowTask completion times.
Definition: SimulationTimestampTypes.h:113
A simulation timestamp class for changes in a host&#39;s pstate.
Definition: SimulationTimestampTypes.h:234
A simulation timestamp class for file copy completions.
Definition: SimulationTimestampTypes.h:217
A top-level base class for simulation timestamps.
Definition: SimulationTimestampTypes.h:23
A base class for simulation timestamps regarding file copies.
Definition: SimulationTimestampTypes.h:144
A simulation timestamp class for file copy start times.
Definition: SimulationTimestampTypes.h:186
A base class for simulation timestamps.
Definition: SimulationTimestampTypes.h:35
WorkflowFile * file
The WorkflowFile that was being copied.
Definition: SimulationTimestampTypes.h:167
static std::map< std::string, SimulationTimestampTask * > pending_task_timestamps
A static map of SimulationTimestampTaskStart objects that have yet to matched with SimulationTimestam...
Definition: SimulationTimestampTypes.h:73
Definition: Alarm.cpp:19
A base class for simulation timestamps regarding workflow tasks.
Definition: SimulationTimestampTypes.h:57