aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-03-22 10:03:59 +0000
committerChristopher Baines <mail@cbaines.net>2024-03-22 10:03:59 +0000
commit59d19a657c70c833ad511b2f52c64f85d31cbecb (patch)
treee981ff38c8970ea4dae60058de004091e89d1e81
parentd0bca34214fcc88edb1292c705b07d363e17b028 (diff)
downloadprometheus-59d19a657c70c833ad511b2f52c64f85d31cbecb.tar
prometheus-59d19a657c70c833ad511b2f52c64f85d31cbecb.tar.gz
Remove locking in call-with-duration-metric
As I think this is unnecessary.
-rw-r--r--prometheus.scm21
1 files 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