feat: add benchmark target to Makefile #14

Merged
mvhutz merged 2 commits from feat/benchmark-target into main 2026-01-11 22:48:27 +00:00
Showing only changes of commit 5256e0f918 - Show all commits

View File

@@ -1,7 +1,7 @@
BINARY_NAME=lambda BINARY_NAME=lambda
TEST=simple TEST=simple
.PHONY: help build run profile explain graph docs clean .PHONY: help build run profile explain graph docs bench clean
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
.SILENT: .SILENT:
@@ -13,6 +13,7 @@ help:
echo " explain - Build and run with explanation mode and profiling" echo " explain - Build and run with explanation mode and profiling"
echo " graph - Generate and open CPU profile visualization" echo " graph - Generate and open CPU profile visualization"
echo " docs - Start local godoc server on port 6060" echo " docs - Start local godoc server on port 6060"
echo " bench - Run benchmarks for all samples"
echo " clean - Remove all build artifacts" echo " clean - Remove all build artifacts"
build: build:
@@ -37,6 +38,9 @@ docs:
echo ">>> View at 'http://localhost:6060/pkg/git.maximhutz.com/max/lambda/'" echo ">>> View at 'http://localhost:6060/pkg/git.maximhutz.com/max/lambda/'"
go run golang.org/x/tools/cmd/godoc@latest -http=:6060 go run golang.org/x/tools/cmd/godoc@latest -http=:6060
bench:
go test -bench=. -benchtime=10x -cpu=4 ./cmd/lambda
clean: clean:
rm -f ${BINARY_NAME} rm -f ${BINARY_NAME}
rm -f program.out rm -f program.out