From 09c58ce481a63cf58666bdc3b7e0545e9351a830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Mon, 15 Dec 2014 13:47:14 +0100 Subject: [PATCH] Upgrade to Go 1.4 This change set upgrades Prometheus to use Go 1.4 The other modifications were intended to compare benchmarks between the old and new versions using `golang.org/x/tools/cmd/benchcmp`. ``` benchmark old ns/op new ns/op delta BenchmarkTargetManager-8 38866 19355 -50.20% BenchmarkTargetPool-8 114763 58989 -48.60% BenchmarkFingerprintLockerParallel-8 747 752 +0.67% BenchmarkFingerprintLockerSerial-8 39.0 39.1 +0.26% BenchmarkAppend-8 2020 2553 +26.39% BenchmarkFuzz-8 1185584705 506752314 -57.26% BenchmarkLabelPairs-8 753 903 +19.92% benchmark old allocs new allocs delta BenchmarkTargetManager-8 41 46 +12.20% BenchmarkTargetPool-8 682 460 -32.55% BenchmarkFingerprintLockerParallel-8 0 0 +0.00% BenchmarkFingerprintLockerSerial-8 0 0 +0.00% BenchmarkAppend-8 11 15 +36.36% BenchmarkFuzz-8 2269055 1061400 -53.22% BenchmarkLabelPairs-8 12 12 +0.00% benchmark old bytes new bytes delta BenchmarkTargetManager-8 8755 7160 -18.22% BenchmarkTargetPool-8 82621 41342 -49.96% BenchmarkFingerprintLockerParallel-8 0 0 +0.00% BenchmarkFingerprintLockerSerial-8 0 0 +0.00% BenchmarkAppend-8 289 293 +1.38% BenchmarkFuzz-8 2307248006 586094916 -74.60% BenchmarkLabelPairs-8 316 304 -3.80% ``` --- .gitignore | 1 + Makefile | 4 ++-- Makefile.INCLUDE | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d283e6f162..748aea229b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ core *-stamp prometheus +benchmark.txt .#* command-line-arguments.test diff --git a/Makefile b/Makefile index 6ab81874a0..930add4ee1 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,8 @@ tag: $(BUILD_PATH)/cache/$(GOPKG): $(CURL) -o $@ -L $(GOURL)/$(GOPKG) -benchmark: test - $(GO) test $(GO_TEST_FLAGS) -test.bench='Benchmark' ./... +benchmark: config dependencies tools + $(GO) test $(GO_TEST_FLAGS) -test.run='NONE' -test.bench='.*' -test.benchmem ./... | tee benchmark.txt clean: $(MAKE) -C $(BUILD_PATH) clean diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index b00524a95e..c936746f69 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -26,7 +26,7 @@ MAC_OS_X_VERSION ?= 10.8 BUILD_PATH = $(PWD)/.build -GO_VERSION := 1.3.3 +GO_VERSION := 1.4 GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(OS))) ifeq ($(GOOS),darwin)