From 52eecf5f524784786e392300deaab6e40f2fa3c0 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Tue, 19 Nov 2024 15:52:02 +0000 Subject: [PATCH] Fix hit rate metric for cache by avoiding precision loss. --- searchcore/src/vespa/searchcore/proton/metrics/cache_metrics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searchcore/src/vespa/searchcore/proton/metrics/cache_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/cache_metrics.h index b38a21bb2d45..1f55ad45093d 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/cache_metrics.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/cache_metrics.h @@ -16,7 +16,7 @@ namespace proton { class CacheMetrics : public metrics::MetricSet { metrics::LongValueMetric memoryUsage; metrics::LongValueMetric elements; - metrics::LongAverageMetric hitRate; + metrics::DoubleAverageMetric hitRate; metrics::LongCountMetric lookups; metrics::LongCountMetric invalidations; std::string _cache_name;