diff options
author | Russ Cox <rsc@golang.org> | 2017-10-27 13:07:38 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2017-10-31 13:20:12 +0000 |
commit | 6c8418f560f076da570b70ac645df7cdb01db188 (patch) | |
tree | f0d3fcfaa512c78711fbc760f0a186f0302da242 /src/make.bash | |
parent | 7dea509703eb5ad66a35628b12a678110fbb1f72 (diff) | |
download | go-6c8418f560f076da570b70ac645df7cdb01db188.tar.gz go-6c8418f560f076da570b70ac645df7cdb01db188.zip |
cmd/dist: log timing to $GOBUILDTIMELOGFILE
We can't make all.bash faster if we can't measure it.
Measure it.
Change-Id: Ia5da791d4cfbfa1fd9a8e905b3188f63819ade73
Reviewed-on: https://go-review.googlesource.com/73990
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/make.bash')
-rwxr-xr-x | src/make.bash | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash index 4e1b7b6bd8..9827abd331 100755 --- a/src/make.bash +++ b/src/make.bash @@ -51,6 +51,10 @@ # # GO_DISTFLAGS: extra flags to provide to "dist bootstrap". # (Or just pass them to the make.bash command line.) +# +# GOBUILDTIMELOGFILE: If set, make.bash and all.bash write +# timing information to this file. Useful for profiling where the +# time goes when these scripts run. set -e @@ -61,6 +65,10 @@ if [ ! -f run.bash ]; then exit 1 fi +if [ "$GOBUILDTIMELOGFILE" != "" ]; then + echo $(date) start make.bash >"$GOBUILDTIMELOGFILE" +fi + # Test for Windows. case "$(uname)" in *MINGW* | *WIN32* | *CYGWIN*) |