Commit 6f94150
fix(benchmarks): ensure all required families are present before extraction
The `getMetrics` already uses a guard before move on to
extractFromMetricFamilies checking for a single family cluster
`controller_runtime_reconcile_total`. However this can't vouch for the existence
of the other metric families in `mfs`. To make sure that the
`extractFromMetricFamilies` does not panic due to the empty maps, extend the
guard with checks to all the metricFamilies. Expect only to fail with timeout
in case that the map is not ready eventually.
This likely does not have any other significant overhead for the benchmark
results.
Signed-off-by: Ioannis Bonatakis <ybonatakis@suse.com>1 parent d7a17a3 commit 6f94150
1 file changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
236 | 254 | | |
237 | 255 | | |
238 | 256 | | |
| |||
256 | 274 | | |
257 | 275 | | |
258 | 276 | | |
259 | | - | |
260 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
261 | 281 | | |
262 | 282 | | |
263 | 283 | | |
| |||
0 commit comments