From 8d73da4bcbeb5b28e46c37c1c20d11a8b668895e Mon Sep 17 00:00:00 2001 From: Ben Bierens <39762930+benbierens@users.noreply.github.com> Date: Thu, 30 Jan 2025 17:09:38 +0100 Subject: [PATCH] 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> --- codex/utils/statsummary.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex/utils/statsummary.nim b/codex/utils/statsummary.nim index dafe85c6..21fc22e1 100644 --- a/codex/utils/statsummary.nim +++ b/codex/utils/statsummary.nim @@ -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)