github.com/snowflakedb/gosnowflake@v1.9.0/benchmark/largesetresult/Makefile (about) 1 ## Setup 2 SHELL := /bin/bash 3 SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") 4 5 setup: 6 go install golang.org/x/lint/golint@latest 7 go install github.com/Songmu/make2help/cmd/make2help@latest 8 9 ## Benchmark 10 profile: 11 go test -run none -bench . -benchtime 3s -benchmem -cpuprofile cpu.out -memprofile mem.out 12 @echo "For CPU usage, run 'go tool pprof largesetresult.test cpu.out'" 13 @echo "For Memory usage, run 'go tool pprof -alloc_space largesetresult.test mem.out'" 14 15 ## Trace 16 trace: 17 go test -trace trace.out 18 @echo "Run 'go tool trace largesetresult.test trace.out'" 19 20 ## Lint 21 lint: setup 22 go vet $(SRC) 23 for pkg in $$(go list ./... | grep -v vendor); do \ 24 golint -set_exit_status $$pkg || exit $$?; \ 25 done 26 27 ## Format source codes using gfmt 28 fmt: setup 29 @gofmt -l -w $(SRC) 30 31 ## Show help 32 help: 33 @make2help $(MAKEFILE_LIST) 34 35 .PHONY: install run