diff options
author | Christopher Baines <mail@cbaines.net> | 2024-03-22 10:03:59 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-03-22 10:03:59 +0000 |
commit | 59d19a657c70c833ad511b2f52c64f85d31cbecb (patch) | |
tree | e981ff38c8970ea4dae60058de004091e89d1e81 | |
parent | d0bca34214fcc88edb1292c705b07d363e17b028 (diff) | |
download | prometheus-59d19a657c70c833ad511b2f52c64f85d31cbecb.tar prometheus-59d19a657c70c833ad511b2f52c64f85d31cbecb.tar.gz |
Remove locking in call-with-duration-metric
As I think this is unnecessary.
-rw-r--r-- | prometheus.scm | 21 |
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 |