-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathjustfile
executable file
·28 lines (24 loc) · 1.14 KB
/
justfile
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
set dotenv-load
set positional-arguments
tmpdir := `mktemp -d`
run bench='.' p='1' benchtime='1s' count='1' output='./report/benchmark-output.txt':
mkdir -p $(dirname {{output}})
rm -f {{output}}
go test -run ^$ -tags it,local \
-report.file ./report/report.json \
-timeout 600m \
-bench={{bench}} \
-count={{count}} \
-p {{p}} \
-test.benchtime {{benchtime}} . | tee -a {{output}}
compare bench='.' p='1' benchtime='1s' count='1' output='./report/benchmark-output.txt':
trap 'rm -rf {{tmpdir}}' EXIT
just run {{bench}} {{p}} {{benchtime}} {{count}} './report/benchmark-output-local.txt'
rm -f ./report/benchmark-output-main.txt
git clone --depth 1 -b main https://github.com/formancehq/ledger {{tmpdir}}
location=$(pwd) && cd {{tmpdir}}/test/performance && just run {{bench}} {{p}} {{benchtime}} {{count}} $location/report/benchmark-output-main.txt
benchstat ./report/benchmark-output-main.txt ./report/benchmark-output-local.txt > ./report/benchmark-comparison.txt || true
graphs:
cd charts && npm install
cd charts && npm run build
cd charts && node ./index.js