Closed tobz closed 4 months ago
Ah, yeah. This is definitely fair. I'll leave this open to remind me to rerun the benchmarks and update accordingly. Thanks!
I've just noticed that the histogram benchmark accumulates a lot of nemory. I need to find a way to occasionally run https://docs.rs/metrics-exporter-prometheus/latest/metrics_exporter_prometheus/struct.PrometheusHandle.html#method.run_upkeep, otherwise I don't think the benchmarks is entirely fair.
For the aforementioned benchmark, this PR switches to using a pre-registered handle. Pre-registered handles are fairly common for super performance-sensitive use cases, so it's a no-brainer to use them when there's no dynamic labels involved... and will naturally be faster than re-registering the metric each time.