swadhinbiswas

[email protected]
2026-07-28 16:47:54 +0600 committed NaN years ago
763b9b5
commit 763b9b5
1 file changed
+2 -2
Showing 1 changed file+2-2
▼.github/workflows/bench.yml
+2-2
32
32
# 1. Build and run on PR branch
33
33
cargo build --release -p justapi-bench --bin justapi-bench
34
34
cargo run --release -p justapi-bench --bin justapi-bench -- --duration 10 > pr_bench.txt
35
- PR_RPS=$(grep -oP 'Requests per second:\s*\K[0-9]+' pr_bench.txt || echo "0")
35
+ PR_RPS=$(grep -oP '\K[0-9]+(?= ops/sec)' pr_bench.txt || echo "0")
36
36
37
37
# 2. Checkout main branch and run
38
38
git checkout main
39
39
cargo build --release -p justapi-bench --bin justapi-bench
40
40
cargo run --release -p justapi-bench --bin justapi-bench -- --duration 10 > main_bench.txt
41
- MAIN_RPS=$(grep -oP 'Requests per second:\s*\K[0-9]+' main_bench.txt || echo "0")
41
+ MAIN_RPS=$(grep -oP '\K[0-9]+(?= ops/sec)' main_bench.txt || echo "0")
42
42
43
43
echo "Main RPS: $MAIN_RPS"
44
44
echo "PR RPS: $PR_RPS"
45
45