-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.29 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.29 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
46
47
48
49
50
51
52
.PHONY: build test run clean bench bench-basic bench-load bench-stress bench-compare bench-setup
build:
go build -o bin/proxy cmd/proxy/main.go
test:
go test ./...
run:
go run cmd/proxy/main.go
clean:
rm -rf bin/
# Performance testing
bench-setup:
@echo "Setting up performance test environment..."
@mkdir -p test/performance/results
@chmod +x test/performance/*.sh test/performance/*.py
@echo "✅ Setup complete"
bench-basic: bench-setup
@echo "Running basic performance test..."
@./test/performance/run_basic_test.sh
bench-load: bench-setup
@echo "Running load test..."
@./test/performance/load_test.sh
bench-stress: bench-setup
@echo "Running stress test..."
@./test/performance/stress_test.sh
bench-compare: bench-setup
@echo "Comparing load balancing algorithms..."
@./test/performance/compare_algorithms.sh
bench-all: bench-basic bench-load bench-compare
@echo "All benchmarks completed!"
# Start test backends
backends:
@echo "Starting test backends on ports 8081, 8082, 8083..."
@python3 test/performance/simple_backend.py 8081 &
@python3 test/performance/simple_backend.py 8082 &
@python3 test/performance/simple_backend.py 8083 &
@sleep 1
@echo "✅ Backends started"
# Run proxy with performance config
run-perf: build
./bin/proxy -config=test/performance/config.yaml