-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (37 loc) · 1.66 KB
/
Copy pathMakefile
File metadata and controls
44 lines (37 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.PHONY: trigger all accuracy memory figures new-snapshot clean
trigger:
git commit --allow-empty -m "trigger ci"
git push
all:
cd go;go test -bench=. -benchmem ./... | tee ../benchmark_result_go.txt
cd rust; cargo bench | tee ../benchmark_result_rust.txt
# --benchmark-json output.json
cd python; uv sync; uv run pytest tz_test.py | tee ../benchmark_result_python.txt
accuracy:
cd go; go run ./internal/cmd/accuracy | tee ../accuracy_result_go.txt
cd python; uv sync; uv run python accuracy.py | tee ../accuracy_result_python.txt
cd rust; cargo run --example accuracy | tee ../accuracy_result_rust.txt
memory:
cd go; go run ./internal/cmd/memory | tee ../memory_result_go.txt
cd python; uv sync; uv run python memory.py | tee ../memory_result_python.txt
cd rust; cargo run --release --example memory | tee ../memory_result_rust.txt
figures:
cd python; uv sync; uv run python ../scripts/generate_figure_data.py
new-snapshot: clean all accuracy memory
@set -e; \
snapshot_dir="snapshot/$$(date +%F)-$$(git rev-parse HEAD)"; \
mkdir -p "$$snapshot_dir"; \
results=$$(ls benchmark_result_*.txt 2>/dev/null || true); \
if [ -z "$$results" ]; then \
echo "No benchmark_result_*.txt found in repository root."; \
exit 1; \
fi; \
cp benchmark_result_*.txt "$$snapshot_dir"/; \
cp accuracy_result_*.txt "$$snapshot_dir"/; \
cp memory_result_*.txt "$$snapshot_dir"/; \
python3 scripts/generate_snapshot_readmes.py --snapshot-root snapshot; \
echo "Created $$snapshot_dir"; \
git add -f "$$snapshot_dir"; \
git commit -m "Add new benchmark snapshot: $$(date +%F) - $$(git rev-parse HEAD)"
clean:
rm -f benchmark_result_*.txt accuracy_result_*.txt memory_result_*.txt