Commit b027416
feat(sensor): round native values to cut recorder volume
Metric sensors previously reported full-precision rolling-average floats,
so the recorder wrote a new states row every publish cycle (zero dedup).
Round the value the recorder sees: loads / capacity-adjusted loads to 1
decimal, MHz (and max_mhz) to the nearest 50 MHz; epp/epb pass through.
MHz uses a step rather than decimals because the value is a 4-digit
average that wanders tens of MHz per cycle, so decimal rounding never
dedupes and sub-50 MHz precision is noise.
Measured against ~2 days of production data this dedupes ~33% of
cpu_capacity states rows (15m windows compress most: mhz_15m -80%,
*_load_15m -42..49%; 1m windows resist by design). Affects states only,
not statistics. Load suggested_display_precision lowered 2 -> 1 so the
UI does not render a fake trailing digit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 933d2f3 commit b027416
1 file changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
157 | 186 | | |
158 | 187 | | |
159 | 188 | | |
| |||
198 | 227 | | |
199 | 228 | | |
200 | 229 | | |
201 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
202 | 234 | | |
203 | 235 | | |
204 | 236 | | |
| |||
0 commit comments