Skip to content

Commit 0944b43

Browse files
authored
Reexport std and var from Statistics (#336)
* [docs] Call Statistics functions in same order as BenchmarkTools output Moved `maximum` to immediately after `minimum`. This makes it easier to match-up the outputs against what `BenchmarkTools` prints. * [docs] Note Statistics reexports * Reexport std and var, remove unnecessary Statistics import
1 parent 72729a6 commit 0944b43

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/src/manual.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ BenchmarkTools.Trial
353353
allocs: Int64 19
354354
```
355355

356-
As you can see from the above, a couple of different timing estimates are pretty-printed with the `Trial`. You can calculate these estimates yourself using the `minimum`, `median`, `mean`, `maximum`, and `std` functions:
356+
As you can see from the above, a couple of different timing estimates are pretty-printed with the `Trial`. You can calculate these estimates yourself using the `minimum`, `maximum`, `median`, `mean`, and `std` functions (Note that `median`, `mean`, and `std` are reexported in `BenchmarkTools` from `Statistics`):
357357

358358
```julia
359359
julia> minimum(t)
@@ -363,6 +363,13 @@ BenchmarkTools.TrialEstimate:
363363
memory: 16.36 KiB
364364
allocs: 19
365365

366+
julia> maximum(t)
367+
BenchmarkTools.TrialEstimate:
368+
time: 1.503 ms
369+
gctime: 1.401 ms (93.21%)
370+
memory: 16.36 KiB
371+
allocs: 19
372+
366373
julia> median(t)
367374
BenchmarkTools.TrialEstimate:
368375
time: 30.818 μs
@@ -377,13 +384,6 @@ BenchmarkTools.TrialEstimate:
377384
memory: 16.36 KiB
378385
allocs: 19
379386

380-
julia> maximum(t)
381-
BenchmarkTools.TrialEstimate:
382-
time: 1.503 ms
383-
gctime: 1.401 ms (93.21%)
384-
memory: 16.36 KiB
385-
allocs: 19
386-
387387
julia> std(t)
388388
BenchmarkTools.TrialEstimate:
389389
time: 25.161 μs

src/BenchmarkTools.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export gctime,
3636
isimprovement,
3737
median,
3838
mean,
39+
std,
40+
var,
3941
rmskew!,
4042
rmskew,
4143
trim

test/GroupsTests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
using BenchmarkTools
44
using BenchmarkTools: TrialEstimate, Parameters
5-
using Statistics
65
using Test
76

87
seteq(a, b) = length(a) == length(b) == length(intersect(a, b))

test/TrialsTests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module TrialsTests
22

33
using BenchmarkTools
4-
using Statistics
54
using Test
65

76
#########

0 commit comments

Comments
 (0)