Commit a100edd
committed
Handle NaN/INF values in FormulaEngine
The MetricFetcher propagates NaN to handle None values
when None values are not treat from the stream as 0s.
So that any FormulaStep can compute the results without
checking for None on each value involved in the FormulaStep.
However the final result is written as None rather than NaN/INF
in the FormulaEngine.
Signed-off-by: Daniel Zullo <[email protected]>1 parent a1ce9b3 commit a100edd
File tree
2 files changed
+18
-19
lines changed- src/frequenz/sdk/timeseries/logical_meter
2 files changed
+18
-19
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| |||
Lines changed: 12 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 84 | + | |
90 | 85 | | |
91 | 86 | | |
92 | 87 | | |
| |||
109 | 104 | | |
110 | 105 | | |
111 | 106 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 107 | + | |
116 | 108 | | |
117 | 109 | | |
118 | 110 | | |
| |||
135 | 127 | | |
136 | 128 | | |
137 | 129 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 130 | + | |
142 | 131 | | |
143 | 132 | | |
144 | 133 | | |
| |||
265 | 254 | | |
266 | 255 | | |
267 | 256 | | |
268 | | - | |
269 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
270 | 264 | | |
271 | 265 | | |
0 commit comments