fix: fix inconsistency in canbench summary report#107
Merged
Conversation
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes inconsistencies in the canbench summary report output by adding a descriptive "status" field and standardizing percentage change reporting across expected output files, as well as making minor improvements in production code. Key changes include:
- Updating expected report files to include a new "status" line with descriptive text and replacing "n/a" with computed percentage changes.
- Modifying the summary reporting in src/summary.rs to use status strings and infinity values in cases with zero baselines.
- Renaming CSV headers in src/csv_file.rs and updating CI workflows to upload CSV artifacts.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| canbench-bin/tests/expected/*.txt | Adjusted expected outputs to include a new "status" field and explicit change percentage values. |
| canbench-bin/src/summary.rs | Updated status handling in the summary report and pushed infinity values when comparing against a zero baseline. |
| canbench-bin/src/lib.rs | Adjusted newline placements when printing results to refine spacing. |
| canbench-bin/src/csv_file.rs | Renamed CSV header fields and modified the percentage formatting function for clarity. |
| .github/workflows/ci.yml | Added steps to upload CSV results artifacts. |
Comments suppressed due to low confidence (1)
canbench-bin/src/lib.rs:123
- [nitpick] Verify that the adjustment to newline placement in the show_results block still produces the intended output formatting.
if show_results { println!("---------------------------------------------------"); ... }
mraszyk
reviewed
May 12, 2025
mraszyk
approved these changes
May 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #106 by moving results analysis fully into the canbench binary, removing it from the run script.
Changes:
Tested on stable-structures PR #301.