@@ -901,33 +901,37 @@ For comparing two or more benchmarks against one another, you can manually speci
901
901
` IOContext ` to set ` :histmin ` and ` :histmax ` :
902
902
903
903
``` julia
904
- julia> io = IOContext (stdout , :histmin => 0.5 , :histmax => 8 )
904
+ julia> io = IOContext (stdout , :histmin => 0.5 , :histmax => 8 , :logbins => true )
905
905
IOContext (Base. TTY (RawFD (13 ) open, 0 bytes waiting))
906
906
907
- julia> b = @benchmark x^ 3 setup= (x = rand ()); show (io, MIME (" text/plain" ), b)
907
+ julia> b = @benchmark x^ 3 setup= (x = rand ()); show (io, MIME (" text/plain" ), b)
908
908
BenchmarkTools. Trial: 10000 samples with 1000 evaluations.
909
- Range (min … max): 1.239 ns … 28.036 ns ┊ GC (min … max): 0.00 % … 0.00 %
910
- Time (median): 1.258 ns ┊ GC (median): 0.00 %
911
- Time (mean ± σ): 1.277 ns ± 0.593 ns ┊ GC (mean ± σ): 0.00 % ± 0.00 %
909
+ Range (min … max): 1.239 ns … 31.433 ns ┊ GC (min … max): 0.00 % … 0.00 %
910
+ Time (median): 1.244 ns ┊ GC (median): 0.00 %
911
+ Time (mean ± σ): 1.266 ns ± 0.611 ns ┊ GC (mean ± σ): 0.00 % ± 0.00 %
912
912
913
- █▁ ▁
914
- ▁▁▁▁▁██▆▄ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ █
913
+ █
914
+ ▁▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
915
915
0.5 ns Histogram: log (frequency) by time 8 ns <
916
916
917
917
Memory estimate: 0 bytes, allocs estimate: 0.
918
918
julia> b = @benchmark x^ 3.0 setup= (x = rand ()); show (io, MIME (" text/plain" ), b)
919
919
BenchmarkTools. Trial: 10000 samples with 1000 evaluations.
920
- Range (min … max): 5.399 ns … 35.552 ns ┊ GC (min … max): 0.00 % … 0.00 %
921
- Time (median): 5.422 ns ┊ GC (median): 0.00 %
922
- Time (mean ± σ): 5.510 ns ± 1.291 ns ┊ GC (mean ± σ): 0.00 % ± 0.00 %
920
+ Range (min … max): 5.636 ns … 38.756 ns ┊ GC (min … max): 0.00 % … 0.00 %
921
+ Time (median): 5.662 ns ┊ GC (median): 0.00 %
922
+ Time (mean ± σ): 5.767 ns ± 1.384 ns ┊ GC (mean ± σ): 0.00 % ± 0.00 %
923
923
924
- █
925
- ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅█▂▂▂▁▁ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
926
- 0.5 ns Histogram: frequency by time 8 ns <
924
+ █▆ ▂ ▁
925
+ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███▄▄▃█ ▁▁▁▁▁▁▁▁▁▁▁▁ █
926
+ 0.5 ns Histogram: log ( frequency) by time 8 ns <
927
927
928
928
Memory estimate: 0 bytes, allocs estimate: 0.
929
+
929
930
```
930
931
932
+ Set ` :logbins ` to ` true ` or ` false ` to ensure that all use the same vertical scaling (log frequency or frequency).
933
+
934
+
931
935
The ` Trial ` object can be visualized using the ` BenchmarkPlots ` package:
932
936
933
937
``` julia
0 commit comments