From d6ade02fd33338991310b84b2c9ec7f1e66f969b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 4 Nov 2019 12:43:26 +0200 Subject: [PATCH] Makefile: add `pprof-cpu` rule for inspecting CPU profiles with `PPROF_FILE=/path/to/cpu.pprof make pprof-cpu` --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 5434ad04d..cfdcc1fa6 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,9 @@ package: package-victoria-metrics release: victoria-metrics-prod cd bin && tar czf victoria-metrics-$(PKG_TAG).tar.gz victoria-metrics-prod +pprof-cpu: + go tool pprof -trim_path=github.com/VictoriaMetrics/VictoriaMetrics@ $(PPROF_FILE) + fmt: GO111MODULE=on gofmt -l -w -s ./lib GO111MODULE=on gofmt -l -w -s ./app