1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:48:32 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
Keith Randall
a6971f4c11 cmd/compilebench: use go command in goroot, not environment
The "go" command is a random "go" in the environment, not
necessarily the one under test.  Use the go command in the
goroot we're testing.

This CL removes the need to add $GOROOT/bin to your path
before running compilebench.

Change-Id: Ieb7f441f8287105e13446006e73b760d80e51e03
Reviewed-on: https://go-review.googlesource.com/42932
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-05-09 19:43:46 +00:00
Josh Bleecher Snyder
b6d1a163df Revert "cmd/compilebench: update example to use benchcmp instead of benchstat"
This reverts commit 3aa1caa08a.

Reason for revert: benchstat is preferred to benchcmp

Change-Id: I9772eb342fb631a68511986d832bb1444766afdc
Reviewed-on: https://go-review.googlesource.com/42027
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-28 05:40:08 +00:00
Marvin Stenger
3aa1caa08a cmd/compilebench: update example to use benchcmp instead of benchstat
Change-Id: Id59ee04aba4d7c50e3b7c4e0b7e9aa75955640f5
Reviewed-on: https://go-review.googlesource.com/41861
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-27 00:37:34 +00:00
Josh Bleecher Snyder
518248cfad cmd/compilebench: add -pkg flag to compile a single package
Sometimes, as with CL 41493, or when investigating
a reported issue, there's a package of interest
that is not part of the standard compilebench suite.
Add a -pkg flag to allow easy access to the compilebench
set of goodies (allocs, object file stats) without
having to edit and reinstall compilebench itself,
which is what I have been doing.

Change-Id: Id6ca6356cae062208f8686c0cb597ed45fc861c0
Reviewed-on: https://go-review.googlesource.com/41627
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-25 22:47:38 +00:00
Josh Bleecher Snyder
7745887299 cmd/compilebench: add object file size to package benchmarks
Protected by flag -obj.

Sample relevant output from compilecmp using this commit.

name       old obj-bytes     new obj-bytes     delta
Template          382k ± 0%         381k ± 0%   -0.23%  (p=0.002 n=6+6)
Unicode           203k ± 0%         203k ± 0%   -0.00%  (p=0.002 n=6+6)
GoTypes          1.18M ± 0%        1.17M ± 0%   -0.08%  (p=0.002 n=6+6)
Compiler         3.99M ± 0%        3.99M ± 0%   -0.08%  (p=0.002 n=6+6)
SSA              8.28M ± 0%        8.28M ± 0%   -0.02%  (p=0.002 n=6+6)
Flate             230k ± 0%         230k ± 0%   -0.05%  (p=0.002 n=6+6)
GoParser          287k ± 0%         287k ± 0%   -0.16%  (p=0.002 n=6+6)
Reflect          1.00M ± 0%        1.00M ± 0%   -0.01%  (p=0.002 n=6+6)
Tar               190k ± 0%         189k ± 0%   -0.24%  (p=0.002 n=6+6)
XML               416k ± 0%         415k ± 0%   -0.16%  (p=0.002 n=6+6)

name       old export-bytes  new export-bytes  delta
Template         19.0k ± 0%        18.2k ± 0%   -4.55%  (p=0.002 n=6+6)
Unicode          4.45k ± 0%        4.44k ± 0%   -0.11%  (p=0.002 n=6+6)
GoTypes          29.7k ± 0%        28.8k ± 0%   -3.12%  (p=0.002 n=6+6)
Compiler         75.6k ± 0%        72.5k ± 0%   -4.03%  (p=0.002 n=6+6)
SSA              76.2k ± 0%        74.8k ± 0%   -1.72%  (p=0.002 n=6+6)
Flate            4.98k ± 0%        4.87k ± 0%   -2.29%  (p=0.002 n=6+6)
GoParser         8.81k ± 0%        8.34k ± 0%   -5.30%  (p=0.002 n=6+6)
Reflect          6.25k ± 0%        6.16k ± 0%   -1.49%  (p=0.002 n=6+6)
Tar              9.49k ± 0%        9.03k ± 0%   -4.82%  (p=0.002 n=6+6)
XML              16.0k ± 0%        15.4k ± 0%   -4.03%  (p=0.002 n=6+6)


Change-Id: I3f5e6ec022cb02ad6937f7859c573ca1edc39fb7
Reviewed-on: https://go-review.googlesource.com/41053
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-04-25 00:26:14 +00:00
Josh Bleecher Snyder
cbb995d093 cmd/compilebench: make StdCmd respect compiler flags flag
Change-Id: I9230492805583092c52ccc87e3be7740ba794c3f
Reviewed-on: https://go-review.googlesource.com/40652
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-13 18:39:38 +00:00
Josh Bleecher Snyder
6e29264c4f cmd/compilebench: fix package name in comment
Change-Id: Ie5c413fc9f13cf029d8d8a6cae5754838c834395
Reviewed-on: https://go-review.googlesource.com/40170
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-10 17:39:46 +00:00
Josh Bleecher Snyder
24acc66eab cmd/compilebench: put in correct subdirectory
Apparently there was a typo during initial import,
and compilebench was placed at the top level,
rather than in the cmd subdirectory. Oops. Fix that.

Change-Id: Ibea9ed132dca26c022ea02933defec9534105f18
Reviewed-on: https://go-review.googlesource.com/39792
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 18:57:16 +00:00