k3s/hack/lib
k8s-merge-robot 0257f54a8c Merge pull request #24850 from madhusudancs/speedup-do-nothing
Automatic merge from submit-queue

Improve the speed of do-nothing build.

As @thockin found out here https://github.com/kubernetes/kubernetes/issues/24518, vast majority of the do-nothing build time is spent in rebuilding the test binaries. There is no staleness check support for test binaries.

This commit implements the staleness checks for test binaries and uses them while building packages.

On my workstation, do-nothing hack/build-go.sh time goes from ~20 secs to ~4 secs, of which only ~1 sec is from doing test binary staleness check now (as opposed to ~17 secs it took to build the test binaries before). I did some experiments to bring this time down to <1 sec. I measured using go test -bench, but it was not very useful in this case. I believe, a vast majority of that ~1 second is being spent in fork/exec and piping the results back to the staleness check program along with the ser-deser involved, but it needs to be validated. Not a proof, but to provide some supporting evidence to this claim, running `go list -f format packages` in the shell takes about 600ms irrespective of what's in the format.

Tests are TBD. I am still trying to figure out how to test this, but I would like to get early feedback

cc @mikedanese @mml
2016-05-22 10:33:04 -07:00
..
etcd.sh Have curl retry etcd download if it fails 2016-03-16 13:43:46 -07:00
golang.sh Merge pull request #24850 from madhusudancs/speedup-do-nothing 2016-05-22 10:33:04 -07:00
init.sh Fix path munging funcs and usage 2016-05-08 20:30:38 -07:00
test.sh Introduce kubectl describe --show-events 2016-05-06 11:40:11 +02:00
util.sh Merge pull request #25611 from soltysh/remote_check 2016-05-21 01:34:10 -07:00
version.sh Demand at least go1.6 2016-05-08 20:30:37 -07:00