zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ go test -run NONE -bench . -count=5 -benchmem | tee cols.txt
goos: linux
goarch: amd64
pkg: zzh/aaa/Ch06/06_02
cpu: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
BenchmarkSum-6 8094 145727 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 7954 144941 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 8118 143843 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 8257 144706 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 7892 145024 ns/op 0 B/op 0 allocs/op
PASS
ok zzh/aaa/Ch06/06_02 5.921s
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ go test -run NONE -bench . -count=5 -benchmem | tee rows.txt
goos: linux
goarch: amd64
pkg: zzh/aaa/Ch06/06_02
cpu: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
BenchmarkSum-6 8164 143457 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 8005 142902 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 7518 144364 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 8059 144572 ns/op 0 B/op 0 allocs/op
BenchmarkSum-6 8080 142755 ns/op 0 B/op 0 allocs/op
PASS
ok zzh/aaa/Ch06/06_02 5.801s
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ benchstat cols.txt rows.txt
benchstat: command not found
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ go install golang.org/x/perf/cmd/benchstat
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ benchstat cols.txt rows.txt
benchstat: command not found
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ go env GOPATH
/home/zzh/go
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ export PATH=$PATH:/home/zzh/go/bin
zzh@ZZHPC:/zdata/MyPrograms/Go/aaa/Ch06/06_02$ benchstat cols.txt rows.txt
goos: linux
goarch: amd64
pkg: zzh/aaa/Ch06/06_02
cpu: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
│ cols.txt │ rows.txt │
│ sec/op │ sec/op vs base │
Sum-6 144.9µ ± ∞ ¹ 143.5µ ± ∞ ¹ -1.02% (p=0.032 n=5)
¹ need >= 6 samples for confidence interval at level 0.95
│ cols.txt │ rows.txt │
│ B/op │ B/op vs base │
Sum-6 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=5) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
│ cols.txt │ rows.txt │
│ allocs/op │ allocs/op vs base │
Sum-6 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=5) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal