Skip to content

Conversation

giordano
Copy link
Member

@giordano giordano commented Aug 25, 2021

Before (see #249):

julia> b = @benchmark $a[$w] .= $b[$w];

julia> b
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min  max):   9.983 μs   1.133 ms  ┊ GC (min  max): 0.00%  98.94%
 Time  (median):     10.765 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   13.441 μs ± 19.772 μs  ┊ GC (mean ± σ):  3.75% ±  2.72%

  █                                                            
  █▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁
  39.3 μs         Histogram: frequency by time        20.5 μs <

 Memory estimate: 38.89 KiB, allocs estimate: 2.

After:

julia> b
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min  max):   9.983 μs   1.133 ms  ┊ GC (min  max): 0.00%  98.94%
 Time  (median):     10.765 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   13.441 μs ± 19.772 μs  ┊ GC (mean ± σ):  3.75% ±  2.72%

  ▆▇█▅▄▂        ▁▁              ▂▂▂▃▃▂▃▃▂▁▁▁                  ▂
  ███████▅▆▆▅▄▄▄██▅▄▄▄▃▁▃▅▃▄▄▆▇████████████████▇█▆▇▇▆▅▆▆▆▅▅▅▆ █
  9.98 μs      Histogram: log(frequency) by time      29.2 μs <

 Memory estimate: 38.89 KiB, allocs estimate: 2.

I don't know how no one else noted that all histograms were broken.

I'm not an expert of BenchmarkTools internals, please triple check I didn't mess up anything. For example, I'm assuming times and gctimes should be sorted together, but I'm not completely sure about it.

Fix #249. CC: @tecosaur

@vchuravy vchuravy merged commit d34a767 into JuliaCI:master Aug 25, 2021
@giordano giordano deleted the mg/sort-times branch August 25, 2021 12:58
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.

Confusing numbers in histogram
3 participants