Remove locking in call-with-duration-metric

As I think this is unnecessary.
This commit is contained in:
Christopher Baines 2024-03-22 10:03:59 +00:00
parent d0bca34214
commit 59d19a657c

View file

@ -424,20 +424,13 @@ The metric with the name @var{metric-name} is fetched from the
" "
(let* ((metric (let* ((metric
(or (metrics-registry-fetch-metric registry metric-name) (or (metrics-registry-fetch-metric registry metric-name)
(call-with-blocked-asyncs (make-histogram-metric
(lambda () registry
(monitor metric-name
;; Check once more in case another thread has created #:buckets buckets
;; the metric while this thread was waiting for the #:docstring docstring
;; mutex #:labels labels
(or (metrics-registry-fetch-metric registry metric-name) #: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))) (start-time (get-internal-real-time)))
(call-with-values (call-with-values
thunk thunk