Report the complexity aggregates in the family's time unit - #2294
Open
lenamonj wants to merge 3 commits into
Open
Report the complexity aggregates in the family's time unit#2294lenamonj wants to merge 3 commits into
lenamonj wants to merge 3 commits into
Conversation
ComputeBigO left big_o.time_unit at the Run() default, so the BigO row was rendered in nanoseconds whatever unit the family declared; CSVReporter rendered the RMS row from the raw, pre-divided field, so it was smaller by the unit multiplier. Both now go through the family unit and the GetAdjusted*Time() accessors, with a millisecond family in complexity_test.cc that fails on main for both.
dmah42
reviewed
Sep 7, 2026
| big_o.cpu_accumulated_time = result_cpu.coef; | ||
| big_o.report_big_o = true; | ||
| big_o.complexity = result_cpu.complexity; | ||
| // The coefficient is a time; reporters render it in the family's unit. |
dmah42
reviewed
Sep 7, 2026
| const std::string& rms_test_name, | ||
| const std::string& big_o, int family_index) { | ||
| const std::string& big_o, int family_index, | ||
| const std::string& time_unit = "ns", |
dmah42
requested changes
Sep 7, 2026
Author
|
Removed the comment and the defaults; each family passes its unit and CSV pattern explicitly. |
LebedevRI
reviewed
Sep 7, 2026
LebedevRI
left a comment
Collaborator
There was a problem hiding this comment.
CSV reporter is deprecated and should not be used.
The CSV reporter is deprecated, so its RMS row is left as it is and the test keeps the pattern it had.
Author
|
Dropped the CSV reporter change and its test pattern; the PR is now the one-line time_unit fix with the JSON check. |
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.
ComputeBigOnever setbig_o.time_unit, so the BigO row kept theRun()default of nanoseconds and its coefficient was rendered in ns whatever unit the family declared. It now carries the family's unit, as the RMS row already did.The new
BM_Complexity_O_N_msfamily declares milliseconds: on main its BigO row reports"time_unit": "ns". The test fails on main and passes here.