6720a6b9
Add make targets for render + bench tests
a73x 2026-04-17 16:33
Commit message
.gitignore
| Old | New | ||
|---|---|---|---|
| @@ -7,3 +7,10 @@ bench.log | |||
| 7 | perf.data | 7 | perf.data |
| 8 | flamegraph.svg | 8 | flamegraph.svg |
| 9 | tests/golden/output/ | 9 | tests/golden/output/ |
| 10 | |||
| 11 | # Scratch test binaries (ad-hoc compilations) | ||
| 12 | /test_io | ||
| 13 | /test_io2 | ||
| 14 | /test_io3 | ||
| 15 | /test_sig | ||
| 16 | /test_timer | ||
Makefile
| Old | New | ||
|---|---|---|---|
| @@ -2,7 +2,7 @@ ZIG ?= zig | |||
| 2 | FLAMEGRAPH ?= flamegraph.pl | 2 | FLAMEGRAPH ?= flamegraph.pl |
| 3 | STACKCOLLAPSE ?= stackcollapse-perf.pl | 3 | STACKCOLLAPSE ?= stackcollapse-perf.pl |
| 4 | 4 | ||
| 5 | .PHONY: build run test bench profile clean | 5 | .PHONY: build run test bench profile clean test-render golden-update bench-baseline bench-check |
| 6 | 6 | ||
| 7 | build: | 7 | build: |
| 8 | $(ZIG) build | 8 | $(ZIG) build |
| @@ -13,7 +13,7 @@ run: build | |||
| 13 | test: | 13 | test: |
| 14 | $(ZIG) build test | 14 | $(ZIG) build test |
| 15 | 15 | ||
| 16 | zig-out/bin/waystty: $(wildcard src/*.zig) $(wildcard shaders/*) | 16 | zig-out/bin/waystty: $(wildcard src/*.zig) $(wildcard src/tools/*.zig) $(wildcard shaders/*) |
| 17 | $(ZIG) build | 17 | $(ZIG) build |
| 18 | 18 | ||
| 19 | bench: zig-out/bin/waystty | 19 | bench: zig-out/bin/waystty |
| @@ -32,5 +32,17 @@ profile: | |||
| 32 | @grep -A 12 "waystty frame timing" bench.log || echo "(no timing data found)" | 32 | @grep -A 12 "waystty frame timing" bench.log || echo "(no timing data found)" |
| 33 | xdg-open flamegraph.svg | 33 | xdg-open flamegraph.svg |
| 34 | 34 | ||
| 35 | test-render: | ||
| 36 | $(ZIG) build test-render | ||
| 37 | |||
| 38 | golden-update: | ||
| 39 | WAYSTTY_GOLDEN_UPDATE=1 $(ZIG) build test-render | ||
| 40 | |||
| 41 | bench-baseline: | ||
| 42 | $(ZIG) build bench-baseline | ||
| 43 | |||
| 44 | bench-check: | ||
| 45 | $(ZIG) build bench-check | ||
| 46 | |||
| 35 | clean: | 47 | clean: |
| 36 | rm -rf zig-out .zig-cache perf.data bench.log flamegraph.svg | 48 | rm -rf zig-out .zig-cache perf.data bench.log flamegraph.svg tests/golden/output |