mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
testing: document -test.bench flag
Fixes #4080. R=rsc, adg CC=golang-dev https://golang.org/cl/6553068
This commit is contained in:
parent
54af752865
commit
b7cbfe6ace
1 changed files with 3 additions and 0 deletions
|
|
@ -15,6 +15,9 @@
|
||||||
// are considered benchmarks, and are executed by the "go test" command when
|
// are considered benchmarks, and are executed by the "go test" command when
|
||||||
// the -test.bench flag is provided. Benchmarks are run sequentially.
|
// the -test.bench flag is provided. Benchmarks are run sequentially.
|
||||||
//
|
//
|
||||||
|
// For a description of the testing flags, see
|
||||||
|
// http://golang.org/cmd/go/#Description_of_testing_flags.
|
||||||
|
//
|
||||||
// A sample benchmark function looks like this:
|
// A sample benchmark function looks like this:
|
||||||
// func BenchmarkHello(b *testing.B) {
|
// func BenchmarkHello(b *testing.B) {
|
||||||
// for i := 0; i < b.N; i++ {
|
// for i := 0; i < b.N; i++ {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue