build: return correct iteration count
Fixes golang/go#19034. Change-Id: Idfb9d764bb4d8362c9837f6d177f0829a72e1365 Reviewed-on: https://go-review.googlesource.com/37238 Run-TryBot: David Lazar <lazard@golang.org> Reviewed-by: Austin Clements <austin@google.com>pull/1/head
parent
d8154158e2
commit
981a3bf009
|
@ -36,6 +36,7 @@ func benchmark() driver.Result {
|
||||||
func benchmarkOnce() driver.Result {
|
func benchmarkOnce() driver.Result {
|
||||||
// run 'go build -a'
|
// run 'go build -a'
|
||||||
res := driver.MakeResult()
|
res := driver.MakeResult()
|
||||||
|
res.N = 1
|
||||||
cmd := exec.Command("go", "build", "-o", "gobuild", "-a", "-p", os.Getenv("GOMAXPROCS"), "cmd/go")
|
cmd := exec.Command("go", "build", "-o", "gobuild", "-a", "-p", os.Getenv("GOMAXPROCS"), "cmd/go")
|
||||||
out, err := driver.RunAndCollectSysStats(cmd, &res, 1, "build-")
|
out, err := driver.RunAndCollectSysStats(cmd, &res, 1, "build-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue