feat: add benchmar Make target
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
.PHONY: build debug-c debug-vm test
|
||||
.PHONY: build debug-c debug-vm test bench
|
||||
|
||||
BENCH_FILE ?= benchmarks/loop.fzs
|
||||
RUNS ?= 7
|
||||
WARMUP ?= 2
|
||||
MAX_ITER ?= 2000000
|
||||
|
||||
build:
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
||||
@@ -17,3 +22,8 @@ debug-vm: build
|
||||
test: build
|
||||
ctest --output-on-failure --test-dir build
|
||||
|
||||
# Compile the benchmark once, then measure only VM process execution.
|
||||
bench: build-release
|
||||
./build/fzc -o build/benchmark.fzb $(BENCH_FILE)
|
||||
python3 scripts/benchmark.py --runs $(RUNS) --warmup $(WARMUP) \
|
||||
--max-iter $(MAX_ITER) --vm ./build/fz --program build/benchmark.fzb
|
||||
|
||||
Reference in New Issue
Block a user