Commit Graph

5 Commits

Author SHA1 Message Date
Josh Bleecher Snyder ded95f530c cmd/compilebench: generate separate cpu profiles when using -count
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>
2017-04-06 17:20:06 +00:00
Josh Bleecher Snyder 1cab72a478 cmd/compilebench: unify Size benchmark implementations
Change-Id: I181d9f9ce8880af8fbcdd43073d62f492725c85b
Reviewed-on: https://go-review.googlesource.com/39717
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-06 17:20:00 +00:00
Josh Bleecher Snyder 89b6e5ee0d cmd/compilebench: change MakeBash to StdCmd
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>
2017-04-06 17:19:53 +00:00
Josh Bleecher Snyder 7e40ef3876 cmd/compilebench: update list of packages
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>
2017-04-06 17:15:02 +00:00
Josh Bleecher Snyder a0d14bb1f7 cmd/compilebench: import from rsc.io
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>
2017-04-06 16:32:47 +00:00