-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathjustfile
More file actions
33 lines (31 loc) · 1 KB
/
justfile
File metadata and controls
33 lines (31 loc) · 1 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
# Run tests
test:
go test -v ./...
# Run benchmarks
bench:
go test -bench=. -benchmem ./...
# Generate benchmark report for current version
# Usage: just bench-report [version]
bench-report version="v0.1.4":
#!/bin/bash
set -e
date=$(date +%Y-%m-%d)
report_file="benchmark_reports/report_{{version}}_${date}.txt"
mkdir -p benchmark_reports
echo "Generating benchmark report for version {{version}}..."
{
echo "=========================================="
echo "JSONPath Benchmark Report"
echo "=========================================="
echo ""
echo "Version: {{version}}"
echo "Date: ${date}"
echo "Go Version: $(go version | awk '{print $3}')"
echo ""
echo "=========================================="
echo "Benchmarks"
echo "=========================================="
echo ""
go test -bench=. -benchmem ./...
} > "${report_file}" 2>&1
echo "Report saved to: ${report_file}"