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)
|
(buckets %default-histogram-buckets)
|
||||||
docstring
|
docstring
|
||||||
(labels '())
|
(labels '())
|
||||||
|
(label-values '())
|
||||||
(label-preset-values '()))
|
(label-preset-values '()))
|
||||||
"Call @var{thunk} while recording the duration in seconds between
|
"Call @var{thunk} while recording the duration in seconds between
|
||||||
calling @var{thunk} and the procedure ending using a metric by the
|
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
|
(call-with-values
|
||||||
thunk
|
thunk
|
||||||
(lambda results
|
(lambda results
|
||||||
(metric-observe metric (- (current-time) start-time))
|
(metric-observe metric
|
||||||
|
(- (current-time) start-time)
|
||||||
|
#:label-values label-values)
|
||||||
|
|
||||||
(apply values results)))))
|
(apply values results)))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue