Repository navigation
Expand file tree
/
Copy pathdashboard.hpp
More file actions
139 lines (90 loc) · 3.22 KB
/
Copy pathdashboard.hpp
File metadata and controls
139 lines (90 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#ifndef ALLSCALE_DASHBOARD_HPP
#define ALLSCALE_DASHBOARD_HPP
#include <cstdint>
#include <vector>
#include <string>
namespace allscale { namespace dashboard
{
struct node_state
{
// the node this state is describing
std::uint64_t rank;
// the time this state was recorded
std::uint64_t time;
// the state of this node
bool online = false;
// is this node active according to the current scheduler
bool active = false;
// -- CPU load --
// the number of cores involved on this node
int num_cores = 1;
// the current CPU load (snapshot)
float cpu_load = 0.0f;
// -- CPU core frequency --
std::uint64_t max_frequency = 1.0;
std::uint64_t cur_frequency = 1.0;
// -- memory state --
// the current memory usage
std::uint64_t memory_load = 0;
// the total available physical memory
std::uint64_t total_memory = 0;
// -- worker state --
// number of tasks processed per second
float task_throughput = 0.0f;
// number of weighted tasks processed per second
float weighted_task_throughput = 0.0f;
// percentage of time being idle
float idle_rate = 0.0f;
// -- network I/O --
// received network throughput
std::uint64_t network_in = 0;
// transmitted network throughput
std::uint64_t network_out = 0;
// -- Data distribution --
// the data owned by this node
std::string ownership;
// -- multi-objective metrics --
// the number of productive cycles spend per second
std::uint64_t productive_cycles_per_second = 0;
// the maximum power consumption per second
float cur_power = 0;
// the maximum energy consumptoin per second
float max_power = 0;
// cycles of progress / max available cycles \in [0..1]
float speed = 0;
// cycles of progress / current available cycles \in [0..1]
float efficiency = 0;
// current power usage / max power usage \in [0..1]
float power = 0;
std::string to_json() const;
template <typename Archive>
void serialize(Archive& ar, unsigned);
};
struct system_state
{
HPX_EXPORT system_state();
// the time this state was recorded
std::uint64_t time = 0;
// -- multi-objective metrics --
// cycles of progress / max available cycles on all nodes \in [0..1]
float speed = 0;
// cycles of progress / current available cycles on active nodes \in [0..1]
float efficiency = 0;
// current power usage / max power usage on all nodes \in [0..1]
float power = 0;
std::string policy;
float speed_exponent = 0.f;
float efficiency_exponent = 0.f;
float power_exponent = 0.f;
// the overall system-wide score of the objective function
float score() const;
// -- the node states --
// the state of the nodes
std::vector<node_state> nodes;
std::string to_json() const;
};
void update();
void get_commands();
void shutdown();
}}
#endif