-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 1.45 KB
/
Makefile
File metadata and controls
45 lines (34 loc) · 1.45 KB
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
.PHONY: tidy build test vet fmt clean bench bootstrap-200 bootstrap-500 bootstrap-1000 bootstrap-2000 \
mixed-hot-1000 mixed-uniform-1000
GO ?= go
N ?= 200
SCENARIO ?= bootstrap
OUT ?= out
tidy:
$(GO) mod tidy
build:
$(GO) build -o bin/bench ./cmd/bench
test:
$(GO) test ./...
vet:
$(GO) vet ./...
fmt:
gofmt -w .
clean:
rm -rf bin out/*
# Generic entry. Override via N=, SCENARIO=, ARGS=.
# make bench N=500 SCENARIO=bootstrap # default: pulls kplane-dev/apiserver:latest
# make bench N=500 SCENARIO=bootstrap ARGS='--apiserver-image=kplane-dev/apiserver:v0.5.0'
# make bench N=500 SCENARIO=bootstrap ARGS='--apiserver-bin=/path/to/apiserver' # local mode
bench:
$(GO) run ./cmd/bench run --scenario=$(SCENARIO) --clusters=$(N) --out=$(OUT) $(ARGS)
bootstrap-200: ; $(MAKE) bench N=200 SCENARIO=bootstrap
bootstrap-500: ; $(MAKE) bench N=500 SCENARIO=bootstrap
bootstrap-1000: ; $(MAKE) bench N=1000 SCENARIO=bootstrap
bootstrap-2000: ; $(MAKE) bench N=2000 SCENARIO=bootstrap
mixed-hot-1000: ; $(MAKE) bench N=1000 SCENARIO=mixed-hot
mixed-uniform-1000: ; $(MAKE) bench N=1000 SCENARIO=mixed-uniform
# The compose stack is bench-driven (bench provisions service-account keys
# and tokens, then exports BENCH_APISERVER_SECRETS into the compose env).
# Don't hand-invoke `docker compose up` against docker/docker-compose.yaml —
# `bench run` (default mode) handles bring-up and tear-down per scenario.