Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7e2e4a73
Commit
7e2e4a73
authored
Oct 04, 2012
by
Shenghou Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/go: add support for -test.benchmem
R=golang-dev, r CC=golang-dev
https://golang.org/cl/6587074
parent
dfa139aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
test.go
src/cmd/go/test.go
+3
-0
testflag.go
src/cmd/go/testflag.go
+2
-0
No files found.
src/cmd/go/test.go
View file @
7e2e4a73
...
...
@@ -94,6 +94,9 @@ directory containing the package sources, has its own flags:
Run benchmarks matching the regular expression.
By default, no benchmarks run.
-test.benchmem
Print memory allocation statistics for benchmarks.
-test.cpuprofile cpu.out
Write a CPU profile to the specified file before exiting.
...
...
src/cmd/go/testflag.go
View file @
7e2e4a73
...
...
@@ -25,6 +25,7 @@ var usageMessage = `Usage of go test:
// These flags can be passed with or without a "test." prefix: -v or -test.v.
-bench="": passes -test.bench to test
-benchmem=false: print memory allocation statistics for benchmarks
-benchtime=1: passes -test.benchtime to test
-cpu="": passes -test.cpu to test
-cpuprofile="": passes -test.cpuprofile to test
...
...
@@ -75,6 +76,7 @@ var testFlagDefn = []*testFlagSpec{
// passed to 6.out, adding a "test." prefix to the name if necessary: -v becomes -test.v.
{
name
:
"bench"
,
passToTest
:
true
},
{
name
:
"benchmem"
,
boolVar
:
new
(
bool
),
passToTest
:
true
},
{
name
:
"benchtime"
,
passToTest
:
true
},
{
name
:
"cpu"
,
passToTest
:
true
},
{
name
:
"cpuprofile"
,
passToTest
:
true
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment