Files
Ben Kochie a2d7daa530 refactor: Use package local metrics (#1578)
* Use package local metrics

Improve performance of metrics by moving them to the package that needs
them. This reduces the overhead to a simple atomic increment for basic
counters like cache hits/misses. This also uses `promauto` to avoid the
second step of having to register metrics.

Signed-off-by: SuperQ <[email protected]>

* Export metrics registry

Export the custom metrics registry from the metrics package so it can be
used with promauto in other packages.

Signed-off-by: SuperQ <[email protected]>

---------

Signed-off-by: SuperQ <[email protected]>
2024-09-04 07:21:34 +02:00
..