When the -count flag is provided,
instead of having each run overwrite the previous profile,
add a count suffix to the profile filename.
Then you can combine the profiles with
go tool pprof `go tool -n compile` <all profile files here>
This allows generation of precise profiles,
even for fast-compiling packages.
Change-Id: I006cf8fad143346b28a646a0b3582cc0f6eec310
Reviewed-on: https://go-review.googlesource.com/39718
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Instead of running make.bash, run 'go build -a std cmd'.
Change the benchmark name to reflect this.
This does roughly the same task, namely compile and link
all the code in the tree, but with several advantages:
* It works cross-platform.
* It is a bit faster, while measuring the same fundamentals.
* It doesn't measure how fast the bootstrap compiler works,
which is irrelevant.
* If interrupted, it leaves the current Go installation
in a usable state.
Change-Id: I469b1d032b48b06e3dea021bd031283bc3a16ff4
Reviewed-on: https://go-review.googlesource.com/39714
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
There's a surprising amount of variety
in the drivers of compilation speed.
It's helpful to have a variety of packages here.
For example, archive/tar exhibits golang/go#19839
much more than the others.
Change-Id: If66b332d63427fb246305cb14cfee9ef450bcdcf
Reviewed-on: https://go-review.googlesource.com/39713
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This CL is an import of compilebench from rsc.io/compilebench
at commit 1a5bec7724500bd6df47e053dbc42b41fe653372.
This CL brings in only main.go, unaltered.
The other files were:
* LICENSE: now unnecessary
* README.md: now unnecessary
* compilecmp: still available at its original home,
soon to be superceded by a new tool in x/tools
Once compilecmp is available in x/tools,
I will replace rsc.io/compilebench with a breadcrumb repo.
All outstanding pull requests against rsc.io/compilebench are from me.
They will be closed, and new CLs sent here as appropriate.
Change-Id: Ic436abf4a662173c6c184bc765b1b9cab13b3cfb
Reviewed-on: https://go-review.googlesource.com/39712
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>