Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2112)

Issue 154173: code review 154173: Adds benchmark support to gotest. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by trevor.strohman
Modified:
14 years, 5 months ago
Reviewers:
r, rsc
Visibility:
Public.

Description

Adds benchmark support to gotest. No benchmarks are run unless the --benchmarks=<regexp> flag is specified on the gotest command line. This change includes sample benchmarks for regexp. % gotest --benchmarks=.* (standard test output redacted) testing.BenchmarkSimpleMatch 200000 7799 ns/op testing.BenchmarkUngroupedMatch 20000 76898 ns/op testing.BenchmarkGroupedMatch 50000 38148 ns/op

Patch Set 1 #

Patch Set 2 : code review 154173: Adds benchmark support to gotest. #

Total comments: 41

Patch Set 3 : code review 154173: Adds benchmark support to gotest. #

Patch Set 4 : code review 154173: Adds benchmark support to gotest. #

Total comments: 6

Patch Set 5 : code review 154173: Adds benchmark support to gotest. #

Total comments: 6

Patch Set 6 : code review 154173: Adds benchmark support to gotest. #

Patch Set 7 : code review 154173: Adds benchmark support to gotest. #

Total comments: 11

Patch Set 8 : code review 154173: Adds benchmark support to gotest. #

Total comments: 2

Patch Set 9 : code review 154173: Adds benchmark support to gotest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -4 lines) Patch
M src/cmd/gotest/doc.go View 6 7 8 2 chunks +10 lines, -3 lines 0 comments Download
M src/cmd/gotest/gotest View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -1 line 0 comments Download
M src/pkg/testing/Makefile View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/testing/benchmark.go View 1 2 3 4 5 6 7 1 chunk +150 lines, -0 lines 0 comments Download
M src/pkg/testing/regexp_test.go View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M src/pkg/testing/testing.go View 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 15
trevor.strohman
Hello r, rsc, I'd like you to review the following change.
14 years, 5 months ago (2009-11-17 06:01:59 UTC) #1
rsc
Thanks for doing this. I like the approach. Please hg upload and reply on the ...
14 years, 5 months ago (2009-11-17 07:34:43 UTC) #2
r
You need to update doc.go as well.
14 years, 5 months ago (2009-11-17 07:36:34 UTC) #3
trevor.strohman
Thanks for the comments. I added a package comment in testing.go and took some public ...
14 years, 5 months ago (2009-11-17 09:30:12 UTC) #4
rsc
looks good to me. thanks again. will leave for r to LGTM and submit http://codereview.appspot.com/154173/diff/2007/22 ...
14 years, 5 months ago (2009-11-18 07:16:49 UTC) #5
trevor.strohman
I ran ./all.bash and "cd src/pkg/testing; gotest --benchmarks=.*" again too. http://codereview.appspot.com/154173/diff/2007/22 File src/cmd/gotest/gotest (right): http://codereview.appspot.com/154173/diff/2007/22#newcode121 ...
14 years, 5 months ago (2009-11-18 16:54:50 UTC) #6
r
i really like this change but it has some unpleasant but short-lived implications. http://codereview.appspot.com/154173/diff/3004/2013 File ...
14 years, 5 months ago (2009-11-18 18:56:07 UTC) #7
trevor.strohman
http://codereview.appspot.com/154173/diff/3004/2013 File src/pkg/testing/benchmark.go (right): http://codereview.appspot.com/154173/diff/3004/2013#newcode12 src/pkg/testing/benchmark.go:12: "time"; On 2009/11/18 18:56:07, r wrote: > there are ...
14 years, 5 months ago (2009-11-18 19:42:41 UTC) #8
r
we're down to comment trivia. http://codereview.appspot.com/154173/diff/3018/2027 File src/cmd/gotest/doc.go (right): http://codereview.appspot.com/154173/diff/3018/2027#newcode22 src/cmd/gotest/doc.go:22: Benchmarks should have signature ...
14 years, 5 months ago (2009-11-18 19:47:32 UTC) #9
trevor.strohman
http://codereview.appspot.com/154173/diff/3018/2027 File src/cmd/gotest/doc.go (right): http://codereview.appspot.com/154173/diff/3018/2027#newcode43 src/cmd/gotest/doc.go:43: 6.out [-v] [-match pattern] [-benchmarks] On 2009/11/18 19:47:32, r ...
14 years, 5 months ago (2009-11-18 19:57:03 UTC) #10
trevor.strohman
Changed -benchmarks back to a pattern. Re-ran ./deps.bash; ./clean.bash; ./all.bash; cd pkg/testing; gotest --benchmarks=.* http://codereview.appspot.com/154173/diff/3018/2027 ...
14 years, 5 months ago (2009-11-18 21:51:15 UTC) #11
r
one keystroke away http://codereview.appspot.com/154173/diff/3030/2039 File src/cmd/gotest/doc.go (right): http://codereview.appspot.com/154173/diff/3030/2039#newcode22 src/cmd/gotest/doc.go:22: Benchmark functions can be written as ...
14 years, 5 months ago (2009-11-18 21:54:38 UTC) #12
rsc
On 2009/11/18 21:54:38, r wrote: > one keystroke away > > http://codereview.appspot.com/154173/diff/3030/2039 > File src/cmd/gotest/doc.go ...
14 years, 5 months ago (2009-11-19 23:27:54 UTC) #13
trevor.strohman
Also: - took out Make.deps as Russ requested - ran ./all.bash - ran gotest --benchmarks=.* ...
14 years, 5 months ago (2009-11-19 23:42:55 UTC) #14
rsc
14 years, 5 months ago (2009-11-20 00:35:36 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=e48fdf85f246 ***

Adds benchmark support to gotest.

No benchmarks are run unless the --benchmarks=<regexp> flag
is specified on the gotest command line.  This change includes
sample benchmarks for regexp.

% gotest --benchmarks=.*
(standard test output redacted)
testing.BenchmarkSimpleMatch	200000	      7799 ns/op
testing.BenchmarkUngroupedMatch	20000	     76898 ns/op
testing.BenchmarkGroupedMatch	50000	     38148 ns/op

R=r, rsc
http://codereview.appspot.com/154173

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b