mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-10 15:02:56 +00:00
The background task loop permit metrics do two of `with_label_values` very often. Change the codepath to cache the counters on first access into a `Lazy` with `enum_map::EnumMap`. The expectation is that this should not fix for metric collection failures under load, but it doesn't hurt. Cc: #7161