df/table: Sum scaled values to compute the totals#10438
Merged
cakebaker merged 2 commits intouutils:mainfrom Jan 23, 2026
Merged
df/table: Sum scaled values to compute the totals#10438cakebaker merged 2 commits intouutils:mainfrom
cakebaker merged 2 commits intouutils:mainfrom
Conversation
16494db to
4db7190
Compare
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
Contributor
Author
|
Ah, I was also looking at the percentage but this seems fine since it's not summing percentages, but it computes it everytime |
|
GNU testsuite comparison: |
20ff83b to
fa644ab
Compare
In order to show the total row we are summing intermediate values as they are and eventually scaling them. Now, while this provides a valid output, it also implies that the total value that we show is not matching the sum of the previously listed values, since the sum of scaled values may different from the sum of the original values that gets eventually scaled. To be consistent with the output: - Use a new BytesCell struct to track the bytes values - Keep a scaled value tracked - Show the sum of the scaled values as total Closes: uutils#10436
It adds extra (tiny, but still...) computation for no reason
fa644ab to
9e1ab7b
Compare
|
GNU testsuite comparison: |
Contributor
|
Thanks! |
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.
In order to show the total row we are summing intermediate values as they
are and eventually scaling them.
Now, while this provides a valid output, it also implies that the total value
that we show is not matching the sum of the previously listed values, since
the sum of scaled values may different from the sum of the original values that
gets eventually scaled.
To be consistent with the output:
Closes: #10436