1- .PHONY : test lint bench benchmark benchmark-quick benchmark-throughput benchmark-hitrate benchmark-external benchmark-suite clean
1+ .PHONY : test lint bench benchmark clean
22
33test :
44 @echo " Running tests in all modules..."
@@ -12,33 +12,15 @@ lint:
1212bench :
1313 go test -bench=. -benchmem
1414
15- # Run all benchmarks (shortest to longest)
16- benchmark : benchmark-quick benchmark-throughput benchmark-external benchmark-hitrate benchmark-suite
17-
18- # Quick hit ratio comparison for tuning (~3s)
19- benchmark-quick :
20- @echo " === Quick Hit Rate Comparison ==="
21- @cd benchmarks && go test -run=TestQuickHitRate -v
22-
23- # Parallel throughput benchmarks (~30s)
24- benchmark-throughput :
25- @echo " === Parallel Throughput Benchmarks ==="
26- @cd benchmarks && go test -bench=BenchmarkThroughput -benchmem -cpu=1,4,8,16
27-
28- # External benchmark comparison (~10s)
29- benchmark-external :
30- @echo " === External Benchmark Comparison (go-cache-benchmark style) ==="
31- @cd benchmarks && go test -run=TestExternalBenchmark -v
32-
33- # Hit ratio benchmarks with trace patterns (~2min)
34- benchmark-hitrate :
35- @echo " === Trace-Based Hit Ratio Benchmarks ==="
36- @cd benchmarks && go test -run=TestTraceHitRate -v -timeout=900s
37-
38- # Full benchmark suite (~5min)
39- benchmark-suite :
40- @echo " === Full Benchmark Suite ==="
41- @cd benchmarks && go test -run=TestBenchmarkSuite -v -timeout=900s
15+ # Run the 5 key benchmarks (~3-5min):
16+ # 1. Meta Trace Hit Rate (real-world)
17+ # 2. Zipf Hit Rate (synthetic)
18+ # 3. Single-Threaded Latency
19+ # 4. Zipf Throughput (1 thread)
20+ # 5. Zipf Throughput (16 threads)
21+ benchmark :
22+ @echo " === bdcache Benchmark Suite ==="
23+ @cd benchmarks && go test -run=TestBenchmarkSuite -v -timeout=300s
4224
4325clean :
4426 go clean -testcache
0 commit comments