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; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 运行基准测试(输出到文件)
|
# 运行基准测试(输出到文件,仅扫描 internal 目录)
|
||||||
bench:
|
bench:
|
||||||
@echo "Running benchmarks..."
|
@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次采样)
|
# 运行基准测试(统计模式,10次采样)
|
||||||
bench-stat:
|
bench-stat:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user