Make call-with-duration-metric more precise
This commit is contained in:
parent
68820efcbd
commit
f661edf72d
1 changed files with 3 additions and 2 deletions
|
|
@ -379,12 +379,13 @@ The metric with the name @var{metric-name} is fetched from the
|
|||
#:docstring docstring
|
||||
#:labels labels
|
||||
#:label-preset-values label-preset-values)))
|
||||
(start-time (current-time)))
|
||||
(start-time (get-internal-real-time)))
|
||||
(call-with-values
|
||||
thunk
|
||||
(lambda results
|
||||
(metric-observe metric
|
||||
(- (current-time) start-time)
|
||||
(/ (- (get-internal-real-time) start-time)
|
||||
internal-time-units-per-second)
|
||||
#:label-values label-values)
|
||||
|
||||
(apply values results)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue