fix(makefile): restrict bench target to internal directory
- Change ./... to ./internal/... to avoid scanning lib/fasthttp - Add -run=^$$ to skip regular tests, run only benchmarks - Properly escape $ in Makefile with $$ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
4dfd6df38b
commit
0de9922e7d
4
Makefile
4
Makefile
@ -214,10 +214,10 @@ act-unit:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# 运行基准测试(输出到文件)
|
||||
# 运行基准测试(输出到文件,仅扫描 internal 目录)
|
||||
bench:
|
||||
@echo "Running benchmarks..."
|
||||
go test -bench=. -benchmem -count=5 ./... 2>&1 | tee bench-results.txt
|
||||
go test -bench=. -benchmem -count=5 -run=^$$ ./internal/... | tee bench-results.txt
|
||||
|
||||
# 运行基准测试(统计模式,10次采样)
|
||||
bench-stat:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user