hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEStatVariables.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #include "DRCEStatVariables.hpp"
4 
5 namespace HCE
6 {
7 namespace drce
8 {
9 //-----------------------------------------------------------------------------
10 template <class T> StatVariableData<T>::StatVariableData(void)
11 : min(), avg(), max()
12 {
13 }
14 //-----------------------------------------------------------------------------
16 : min(), avg(), max()
17 {
18  (*this) = rhs;
19 }
20 //-----------------------------------------------------------------------------
22 : min(), avg(), max()
23 {
24  (*this) = std::forward<StatVariableData>(rhs);
25 }
26 //-----------------------------------------------------------------------------
28 {
29  if (this!=&rhs)
30  {
31  min = rhs.min;
32  avg = rhs.avg;
33  max = rhs.max;
34  }
35  return *this;
36 }
37 //-----------------------------------------------------------------------------
39 {
40  if (this!=&rhs)
41  {
42  min = std::move(rhs.min);
43  avg = std::move(rhs.avg);
44  max = std::move(rhs.max);
45  }
46  return *this;
47 }
48 //-----------------------------------------------------------------------------
49 template <class T> void StatVariableData<T>::clear(void)
50 {
51  min = T();
52  avg = T();
53  max = T();
54 }
55 //-----------------------------------------------------------------------------
56 //-----------------------------------------------------------------------------
58 : timeAsyncTask(), timeSyncTask(), sizeInputBufferSyncTasks(), sizeOutputBufferSyncTasks(),
59  sizeInputBufferAsyncTasks(), sizeOutputBufferAsyncTasks(), cpuUsageAsyncTasks(), memoryUsageAsyncTasks(),
60  countSyncTasksForMinute(), countAsyncTasksForMinute(), countSyncTasks(0), countAsyncTasks(0),
61  countSyncTasksFail(0), countAsyncTasksFail(0)
62 {
63 }
64 //-----------------------------------------------------------------------------
66 : timeAsyncTask(), timeSyncTask(), sizeInputBufferSyncTasks(), sizeOutputBufferSyncTasks(),
67  sizeInputBufferAsyncTasks(), sizeOutputBufferAsyncTasks(), cpuUsageAsyncTasks(), memoryUsageAsyncTasks(),
68  countSyncTasksForMinute(), countAsyncTasksForMinute(), countSyncTasks(0), countAsyncTasks(0),
69  countSyncTasksFail(0), countAsyncTasksFail(0)
70 {
71  (*this) = rhs;
72 }
73 //-----------------------------------------------------------------------------
75 : timeAsyncTask(), timeSyncTask(), sizeInputBufferSyncTasks(), sizeOutputBufferSyncTasks(),
76  sizeInputBufferAsyncTasks(), sizeOutputBufferAsyncTasks(), cpuUsageAsyncTasks(), memoryUsageAsyncTasks(),
77  countSyncTasksForMinute(), countAsyncTasksForMinute(), countSyncTasks(0), countAsyncTasks(0),
78  countSyncTasksFail(0), countAsyncTasksFail(0)
79 {
80  (*this) = std::forward<StatVariables>(rhs);
81 }
82 //-----------------------------------------------------------------------------
84 {
85  if (this!=&rhs)
86  {
101  }
102  return *this;
103 }
104 //-----------------------------------------------------------------------------
106 {
107  if (this!=&rhs)
108  {
109  timeAsyncTask = std::move(rhs.timeAsyncTask);
110  timeSyncTask = std::move(rhs.timeSyncTask);
111  sizeInputBufferSyncTasks = std::move(rhs.sizeInputBufferSyncTasks);
112  sizeOutputBufferSyncTasks = std::move(rhs.sizeOutputBufferSyncTasks);
113  sizeInputBufferAsyncTasks = std::move(rhs.sizeInputBufferAsyncTasks);
114  sizeOutputBufferAsyncTasks = std::move(rhs.sizeOutputBufferAsyncTasks);
115  cpuUsageAsyncTasks = std::move(rhs.cpuUsageAsyncTasks);
116  memoryUsageAsyncTasks = std::move(rhs.memoryUsageAsyncTasks);
117  countSyncTasksForMinute = std::move(rhs.countSyncTasksForMinute);
118  countAsyncTasksForMinute = std::move(rhs.countAsyncTasksForMinute);
119  countSyncTasks = std::move(rhs.countSyncTasks);
120  countAsyncTasks = std::move(rhs.countAsyncTasks);
121  countSyncTasksFail = std::move(rhs.countSyncTasksFail);
122  countAsyncTasksFail = std::move(rhs.countAsyncTasksFail);
123  }
124  return *this;
125 }
126 //-----------------------------------------------------------------------------
128 {
139  countSyncTasks = 0;
140  countAsyncTasks = 0;
141  countSyncTasksFail = 0;
143 }
144 //-----------------------------------------------------------------------------
145 //-----------------------------------------------------------------------------
146 } // end namespace drce
147 } // end namespace HCE