From 59d19a657c70c833ad511b2f52c64f85d31cbecb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 22 Mar 2024 10:03:59 +0000 Subject: Remove locking in call-with-duration-metric As I think this is unnecessary. --- prometheus.scm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/prometheus.scm b/prometheus.scm index 5c45c8e..5bb42af 100644 --- a/prometheus.scm +++ b/prometheus.scm @@ -424,20 +424,13 @@ The metric with the name @var{metric-name} is fetched from the " (let* ((metric (or (metrics-registry-fetch-metric registry metric-name) - (call-with-blocked-asyncs - (lambda () - (monitor - ;; Check once more in case another thread has created - ;; the metric while this thread was waiting for the - ;; mutex - (or (metrics-registry-fetch-metric registry metric-name) - (make-histogram-metric - registry - metric-name - #:buckets buckets - #:docstring docstring - #:labels labels - #:label-preset-values label-preset-values))))))) + (make-histogram-metric + registry + metric-name + #:buckets buckets + #:docstring docstring + #:labels labels + #:label-preset-values label-preset-values))) (start-time (get-internal-real-time))) (call-with-values thunk -- cgit v1.2.3