Commit f9acea5
committed
feat(disable-power-models): Update Other and Total Energy Metric calculations
If DisablePowerModels is enabled, any metrics with source "trained_power_model" that
are used in Other and Total Energy Calculations (ex. kepler_node_other_joules_total,
kepler_process_other_joules_total, kepler_container_other_joules_total,
kepler_container_joules_total, kepler_process_joules_total) are removed from the
calculation (by replacing the metric value with 0). Negative values will be replaced with
0. If all metrics used for Other and Total Energy Calculations are from source "trained_power_model",
then the Other and Total Energy Calculations will export 0 (they will not be removed from prometheus).
Signed-off-by: Kaiyi Liu <kaliu@redhat.com>1 parent 7019cce commit f9acea5
File tree
3 files changed
+22
-4
lines changed- pkg
- metrics/metricfactory
- model
3 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
117 | 127 | | |
118 | 128 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
0 commit comments