-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 734 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 734 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
.PHONY: build test bench bench-compare lint demo install clean
build:
go build -o bin/chanopt ./cmd/chanopt
test:
go test -race -count=1 ./...
bench:
cd demos && go test -bench=. -benchmem -count=5 -timeout=120s | tee bench.txt
bench-compare:
@echo "── Channel vs Optimized (side-by-side) ──"
cd demos && go test -bench=. -benchmem -count=5 -timeout=120s | \
grep -E 'Benchmark|^$$' | column -t
lint: build
go vet ./...
cd demos && go vet -vettool=../bin/chanopt ./antipatterns/ 2>&1 || true
demo: build
@echo "── Running chanopt on demo anti-patterns ──"
cd demos && go vet -vettool=../bin/chanopt ./antipatterns/ 2>&1 || true
install:
go install ./cmd/chanopt
clean:
rm -rf bin/ demos/bench.txt