Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix percentage formatting to 1 d.p. #142

Merged
merged 2 commits into from
Jan 22, 2022

Conversation

IanButterworth
Copy link
Contributor

@IanButterworth IanButterworth commented Jan 10, 2022

Closes #141

 ───────────────────────────────────────────────────
                         Time          Allocations  
                   ───────────────   ───────────────
  Total measured:      35.9ms            12.1MiB    

 Section   ncalls     time    %tot     alloc    %tot
 ───────────────────────────────────────────────────
 foobar         2   2.07μs   81.5%   2.94KiB  100.0%
   baz          2    150ns    5.9%     0.00B    0.0%
   foo          1    150ns    5.9%     0.00B    0.0%
   bar          1   60.0ns    2.4%     0.00B    0.0%
 foo            1    191ns    7.5%     0.00B    0.0%
 baz            2    150ns    5.9%     0.00B    0.0%
 bar            2    130ns    5.1%     0.00B    0.0%
 ───────────────────────────────────────────────────
 ────────────────────────────────────────────────────────────────────
                            Time                    Allocations      
                   ───────────────────────   ────────────────────────
 Tot / % measured:     36.2ms /   0.0%           12.1MiB /   0.0%    

 Section   ncalls     time    %tot     avg     alloc    %tot      avg
 ────────────────────────────────────────────────────────────────────
 foobar         2   2.07μs   81.5%  1.04μs   2.94KiB  100.0%  1.47KiB
   baz          2    150ns    5.9%  75.0ns     0.00B    0.0%    0.00B
   foo          1    150ns    5.9%   150ns     0.00B    0.0%    0.00B
   bar          1   60.0ns    2.4%  60.0ns     0.00B    0.0%    0.00B
 foo            1    191ns    7.5%   191ns     0.00B    0.0%    0.00B
 baz            2    150ns    5.9%  75.0ns     0.00B    0.0%    0.00B
 bar            2    130ns    5.1%  65.0ns     0.00B    0.0%    0.00B
 ────────────────────────────────────────────────────────────────────
 ─────────────────────────────────
 Section   ncalls     time    %tot
 ─────────────────────────────────
 foobar         2   2.07μs   81.5%
   baz          2    150ns    5.9%
   foo          1    150ns    5.9%
   bar          1   60.0ns    2.4%
 foo            1    191ns    7.5%
 baz            2    150ns    5.9%
 bar            2    130ns    5.1%
 ─────────────────────────────────
 ─────────────────────────────────────────
                            Time          
                   ───────────────────────
 Tot / % measured:     36.8ms /   0.0%    

 Section   ncalls     time    %tot     avg
 ─────────────────────────────────────────
 foobar         2   2.07μs   81.5%  1.04μs
   baz          2    150ns    5.9%  75.0ns
   foo          1    150ns    5.9%   150ns
   bar          1   60.0ns    2.4%  60.0ns
 foo            1    191ns    7.5%   191ns
 baz            2    150ns    5.9%  75.0ns
 bar            2    130ns    5.1%  65.0ns
 ─────────────────────────────────────────

If there are any %'s greater than 100% (which can happen in threaded merges) they will cause misalignment, but I think that's a reasonable bug to leave?
(Perhaps to be fixed formally by a merge method that has a kwarg for parallelism factor that does auto division when merging, etc. but that's another issue)

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2022

Codecov Report

Merging #142 (05f122d) into master (74556e6) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   89.26%   89.16%   -0.11%     
==========================================
  Files           5        5              
  Lines         410      406       -4     
==========================================
- Hits          366      362       -4     
  Misses         44       44              
Impacted Files Coverage Δ
src/show.jl 96.39% <100.00%> (ø)
src/utilities.jl 95.08% <100.00%> (-0.31%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74556e6...05f122d. Read the comment docs.

@IanButterworth IanButterworth changed the title Print %'s to 1d.p. always Fix percentage formatting to 1 d.p. Jan 11, 2022
@IanButterworth
Copy link
Contributor Author

Just bumped the patch. It would be nice to get this out

@IanButterworth
Copy link
Contributor Author

IanButterworth commented Jan 22, 2022

Bump. I think about this every time I see a report now 🙃

@KristofferC KristofferC merged commit 87ba338 into KristofferC:master Jan 22, 2022
@IanButterworth IanButterworth deleted the ib/perc_fixed branch January 22, 2022 17:40
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.

Fixed % number formatting to highlight proportions
3 participants