Index: src/pkg/testing/testing.go
===================================================================
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -23,10 +23,10 @@
// Functions of the form
// func BenchmarkXxx(*testing.B)
// are considered benchmarks, and are executed by the "go test" command
when
-// the -test.bench flag is provided. Benchmarks are run sequentially.
+// the -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.
+// http://golang.org/cmd/go/#hdr-Description_of_testing_flags.
//
// A sample benchmark function looks like this:
// func BenchmarkHello(b *testing.B) {
r...@golang.org
unread,
Jun 14, 2013, 2:10:37 PM6/14/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dpi...@gmail.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com, r...@golang.org, re...@codereview-hr.appspotmail.com
On 2013/06/14 18:10:37, r wrote:
> the flag is called test.bench.
I think I understand now how flags to `go test` are passed to the
testing binary and that's what would make `go test -test.bench .` work.
If it helps, two things that led to me thinking this snippet was
incorrect were:
* `go test -test.bench` spitting out the `go help` output since I didn't
have a regex
* `go help testflag` listing `-bench` directly
Happy to remove that change if there's nothing salvageable, or add some
more description if it would be helpful. There are example benchmark
functions, perhaps adding an example run of `go test` would be good?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dpi...@gmail.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
From this package's point of view, the flag is called test.bench. You
can see the declaration. The go test command provides a convenient
shortcut by letting you drop the "test.", but it's a property of go
test, not of this package.