forked from timescale/tsbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (57 loc) · 1.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Go parameters
GOCMD=GO111MODULE=on go
GOBUILD=$(GOCMD) build
GOINSTALL=$(GOCMD) install
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GOMOD=$(GOCMD) mod
GOFMT=$(GOCMD) fmt
.PHONY: all generators loaders runners lint fmt checkfmt
all: generators loaders runners
generators: tsbs_generate_data \
tsbs_generate_queries
loaders: tsbs_load \
tsbs_load_akumuli \
tsbs_load_cassandra \
tsbs_load_clickhouse \
tsbs_load_cratedb \
tsbs_load_influx \
tsbs_load_mongo \
tsbs_load_prometheus \
tsbs_load_siridb \
tsbs_load_timescaledb \
tsbs_load_victoriametrics \
tsbs_load_questdb
runners: tsbs_run_queries_akumuli \
tsbs_run_queries_cassandra \
tsbs_run_queries_clickhouse \
tsbs_run_queries_cratedb \
tsbs_run_queries_influx \
tsbs_run_queries_mongo \
tsbs_run_queries_siridb \
tsbs_run_queries_timescaledb \
tsbs_run_queries_timestream \
tsbs_run_queries_victoriametrics \
tsbs_run_queries_questdb
test:
$(GOTEST) -v ./...
coverage:
$(GOTEST) -race -coverprofile=coverage.txt -covermode=atomic ./...
tsbs_%: $(wildcard ./cmd/$@/*.go)
$(GOGET) ./cmd/$@
$(GOBUILD) -o bin/$@ ./cmd/$@
$(GOINSTALL) ./cmd/$@
checkfmt:
@echo 'Checking gofmt';\
bash -c "diff -u <(echo -n) <(gofmt -d .)";\
EXIT_CODE=$$?;\
if [ "$$EXIT_CODE" -ne 0 ]; then \
echo '$@: Go files must be formatted with gofmt'; \
fi && \
exit $$EXIT_CODE
lint:
$(GOGET) github.com/golangci/golangci-lint/cmd/golangci-lint
golangci-lint run
fmt:
$(GOFMT) ./...