Remove locking in call-with-duration-metric
As I think this is unnecessary.
This commit is contained in:
parent
d0bca34214
commit
59d19a657c
1 changed files with 7 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue