-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (24 loc) · 941 Bytes
/
Copy pathmakefile
File metadata and controls
31 lines (24 loc) · 941 Bytes
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
APP_EXECUTABLE=zeno-build
.PHONY: proto build run clean bench loadtest
proto:
rm -f pb/*.pb.go
protoc --go_out=. --go_opt=module=zeno --go-grpc_out=. --go-grpc_opt=module=zeno proto/*.proto
build:
GOARCH=amd64 GOOS=darwin go build -o ${APP_EXECUTABLE}-darwin ./cmd/zeno
GOARCH=amd64 GOOS=linux go build -o ${APP_EXECUTABLE}-linux ./cmd/zeno
GOARCH=amd64 GOOS=windows go build -o ${APP_EXECUTABLE}-windows ./cmd/zeno
run: build
./${APP_EXECUTABLE}-darwin
# Component micro-benchmarks (no server needed): RESP parse/marshal, the
# command handlers, and the queue. Runs anywhere.
bench:
go test -run '^$$' -bench . -benchmem ./...
# End-to-end load test against a running leader (see bench/main.go docs).
# Pass flags through ARGS, e.g. `make loadtest ARGS="-cmd GET -clients 100"`.
loadtest:
go run ./bench $(ARGS)
clean:
go clean
rm -f ${APP_EXECUTABLE}-darwin
rm -f ${APP_EXECUTABLE}-linux
rm -f ${APP_EXECUTABLE}-windows