Update codex/utils/statsummary.nim

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com>
This commit is contained in:
Ben Bierens 2025-01-30 17:09:38 +01:00 committed by GitHub
parent d70af86d2a
commit 8d73da4bcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,9 @@ proc observeStatSummary(st: StatSummary, value: float64) =
st.max = value
st.ravg = value
template observe*(statSummary: StatSummary | type IgnoredCollector, amount: int64 | float64 = 1) =
template observe*(
statSummary: StatSummary | type IgnoredCollector, amount: int64 | float64 = 1
) =
when defined(metrics) and statSummary is not IgnoredCollector:
{.gcsafe.}:
observeStatSummary(statSummary, amount.float64)