Allow passing label-values to call-with-duration-metric
This commit is contained in:
parent
875d9994b0
commit
68820efcbd
1 changed files with 4 additions and 1 deletions
|
|
@ -361,6 +361,7 @@ values are the values."
|
|||
(buckets %default-histogram-buckets)
|
||||
docstring
|
||||
(labels '())
|
||||
(label-values '())
|
||||
(label-preset-values '()))
|
||||
"Call @var{thunk} while recording the duration in seconds between
|
||||
calling @var{thunk} and the procedure ending using a metric by the
|
||||
|
|
@ -382,7 +383,9 @@ The metric with the name @var{metric-name} is fetched from the
|
|||
(call-with-values
|
||||
thunk
|
||||
(lambda results
|
||||
(metric-observe metric (- (current-time) start-time))
|
||||
(metric-observe metric
|
||||
(- (current-time) start-time)
|
||||
#:label-values label-values)
|
||||
|
||||
(apply values results)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue