Fix call-with-duration-metric to work with multiple values
This commit is contained in:
parent
12d3d9de67
commit
fba2005362
1 changed files with 6 additions and 3 deletions
|
|
@ -355,9 +355,12 @@ The metric with the name @var{metric-name} is fetched from the
|
||||||
registry
|
registry
|
||||||
metric-name)))
|
metric-name)))
|
||||||
(start-time (current-time)))
|
(start-time (current-time)))
|
||||||
(let ((result (thunk)))
|
(call-with-values
|
||||||
(metric-observe metric (- (current-time) start-time))
|
thunk
|
||||||
result)))
|
(lambda results
|
||||||
|
(metric-observe metric (- (current-time) start-time))
|
||||||
|
|
||||||
|
(apply values results)))))
|
||||||
|
|
||||||
(define (write-metrics registry port)
|
(define (write-metrics registry port)
|
||||||
"Write all metrics from the given @var{registry} to @var{port} in
|
"Write all metrics from the given @var{registry} to @var{port} in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue