Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Created October 31, 2011 19:42
Show Gist options
  • Save bmizerany/1328637 to your computer and use it in GitHub Desktop.
Save bmizerany/1328637 to your computer and use it in GitHub Desktop.
The console commands + output
; gotest -x -v -cpuprofile=prof.out -run="no tests" -bench="."
gotest 0.00s: gomake testpackage-clean
rm -f _test/github.com/bmizerany/mc.go.a
[+0.08s]
gotest 0.08s: gomake testpackage GOTESTFILES=bench_test.go mc_test.go util_test.go
6g -p github.com/bmizerany/mc.go -o _gotest_.6 mc.go bench_test.go mc_test.go util_test.go
rm -f _test/github.com/bmizerany/mc.go.a
gopack grc _test/github.com/bmizerany/mc.go.a _gotest_.6
[+0.19s]
gotest 0.27s: gomake -s importpath
[+0.07s]
gotest 0.34s: 6g -I _test _testmain.go
[+0.02s]
gotest 0.36s: 6l -L _test _testmain.6
[+0.44s]
gotest 0.80s: ./6.out -test.v=true -test.cpuprofile=prof.out -test.run=no tests -test.bench=.
PASS
mc.BenchmarkSet100k 1 18968717000 ns/op
[+19.00s]
gotest 19.80s: done
;
; cat prof.out
?f_o?ilj?SU)??;
; gopprof ./6.out prof.out
Welcome to pprof! For help, type 'help'.
(pprof) top10
Total: 1037 samples
1037 100.0% 100.0% 1037 100.0% __cgo_allocate
(pprof) quit
;
; gotest -x -v -cpuprofile=prof.out -run="no tests" -bench="."
gotest 0.00s: gomake testpackage-clean
rm -f _test/github.com/bmizerany/mc.go.a
[+0.07s]
gotest 0.08s: gomake testpackage GOTESTFILES=bench_test.go mc_test.go util_test.go
rm -f _test/github.com/bmizerany/mc.go.a
gopack grc _test/github.com/bmizerany/mc.go.a _gotest_.6
[+0.10s]
gotest 0.17s: gomake -s importpath
[+0.07s]
gotest 0.24s: 6g -I _test _testmain.go
[+0.02s]
gotest 0.26s: 6l -L _test _testmain.6
[+0.38s]
gotest 0.64s: ./6.out -test.v=true -test.cpuprofile=prof.out -test.run=no tests -test.bench=.
PASS
mc.BenchmarkSet100k 1 13705275000 ns/op
[+13.74s]
gotest 14.38s: done
; gopprof ./6.out prof.out
Welcome to pprof! For help, type 'help'.
(pprof) top10
Total: 1013 samples
1013 100.0% 100.0% 1013 100.0% __cgo_allocate
(pprof)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment