fix: derive benchmark Throughput and Mean time per paragraph from ns/op - #57
Conversation
The Comment PR with results and Generate summary steps in benchmark-profile.yml matched literal "Throughput:" and "Mean time per paragraph:" text that go test -bench never prints, so both fields always fell back to N/A. Derive them instead from the ns/op value that is already parsed successfully, falling back to N/A only when ns/op itself can't be parsed. Closes #55
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📊 Benchmark & Profile ResultsPerformance Summary
🔍 Interactive Profile VisualizationsView the interactive profile graphs directly in your browser:
CPU Profile (Top 20)Memory Profile (Top 20)📥 All Artifacts AvailableDownload the complete profiling package from the workflow artifacts:
Full Benchmark OutputGenerated by Benchmark & Profile workflow run #31519210775 • Updated: Tue, 11 Aug 2026 17:49:34 GMT |



Summary
.github/workflows/benchmark-profile.yml'sComment PR with resultsandGenerate summarysteps matched literalThroughput:andMean time per paragraph:text that plaingo test -bench -benchmemoutput never contains, so both fields always fell back toN/A(onlyns/opmatched and showed real data).1e9 / ns_per_opparagraphs/second) and a human-readable Mean time per paragraph directly from thens/opvalue that was already being parsed successfully, falling back toN/Aonly whenns/opitself can't be parsed (avoidingNaN/Infinity).Closes #55
Test plan
actionlinton the modified workflow file — no findings.go test -benchoutput — confirmed real Throughput/Mean-time values are produced and are mathematically consistent withns/op, and confirmed fallback toN/A(noNaN/Infinity) whenns/opcan't be parsed.awk— confirmed matching real values.go build ./...andgo vet ./...— unaffected, pass.benchmark-profile.ymlthat the posted comment and$GITHUB_STEP_SUMMARYshow real, non-N/Avalues (requires this PR itself to trigger the workflow).