Skip to content

Conversation

@dimitarvdimitrov
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov commented Dec 8, 2025

ReportMetric wasn't showing the cost in benchmark output. Perhaps because it was called before ResetTimer.


Note

Moves the b.ReportMetric(m.SingleMatchCost(), "cost") call in BenchmarkFastRegexMatcher to after b.ResetTimer() and the loop so the cost metric is emitted.

Written by Cursor Bugbot for commit 79941d6. This will update automatically on new commits. Configure here.

Move ReportMetric call after the benchmark loop to ensure
the cost metric is actually reported in benchmark output.
@dimitarvdimitrov dimitarvdimitrov changed the title benchmark: report cost metric after ResetTimer BenchmarkFastRegexMatcher: report cost metric after ResetTimer Dec 8, 2025
@dimitarvdimitrov dimitarvdimitrov merged commit 230af1f into main Dec 8, 2025
77 of 79 checks passed
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/labels/fix-benchmark-cost-reporting branch December 8, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants