diff options
| author | eunhhu <[email protected]> | 2026-10-05 18:48:09 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-05 18:48:09 +0100 |
| commit | f3b48783311bb0c50596c8e2b35348fc5282e5a9 (patch) | |
| tree | b727927dcb361b54221012d60c9c5d2407670451 /research/experiments/040-against-c/runs.sh | |
| parent | 4bedd7f03eb18fd79492c905d142b9bcf1acf242 (diff) | |
| download | pure-f3b48783311bb0c50596c8e2b35348fc5282e5a9.tar.gz pure-f3b48783311bb0c50596c8e2b35348fc5282e5a9.zip | |
040: TPC-C and the bank's queries against 6b45806 (023's criterion for the apps there are): six pairs in turns, TPC-C's median -1.2% (the pairs -5.2 to +1.4%), the queries' medians within 1% but in_credit's (0.84 to 0.815 ms); the queries' instructions +0.3 to +1.5% on 49b6196 (2026-10-05-counts-49b6196.jsonl), -0.1 to +0.5% after the list's tree paths left HASHED's checks (2026-10-05-counts.jsonl). runs.sh serve, pairs and counts
Diffstat (limited to 'research/experiments/040-against-c/runs.sh')
| -rw-r--r-- | research/experiments/040-against-c/runs.sh | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/research/experiments/040-against-c/runs.sh b/research/experiments/040-against-c/runs.sh index 8c1620b..a265ac0 100644 --- a/research/experiments/040-against-c/runs.sh +++ b/research/experiments/040-against-c/runs.sh @@ -9,6 +9,13 @@ # (PURE_AHEAD=0) # runs.sh floor ROUNDS floor.c's three modes (bare, hoisted, naive), # each against natural.h's C +# runs.sh serve NAME COMMIT pure-serve of COMMIT and its pure-crypto.so, +# in ~/.cache/pure-040/NAME +# runs.sh pairs A B FIRST LAST TPC-C in RAM (W=1, 64 terminals, 20 s) and +# the bank's queries on A and B, in turns +# (036's), rounds FIRST to LAST +# runs.sh counts A B the bank queries' instructions on A and B +# (025's count.py) set -e here=research/experiments/040-against-c builds=$HOME/.cache/pure-040 @@ -35,12 +42,36 @@ suite) quiet PURE_AHEAD=0 python3 research/guard.py --most 3072 -- "$builds/$2/suite-run" "$builds/$2" "$3" bfs bfs_ahead \ | sed "s/^{/{\"version\":\"$2\",\"jit\":1,\"ahead\":0,/" >> "$here/$day-suite.jsonl" ;; +serve) + rm -rf "$builds/src-$2" + git worktree add -f -q --detach "$builds/src-$2" "$3" + make -s -C "$builds/src-$2" build/pure-serve build/pure-crypto.so + mkdir -p "$builds/$2" + cp "$builds/src-$2/build/pure-serve" "$builds/src-$2/build/pure-crypto.so" "$builds/$2/" + git worktree remove --force "$builds/src-$2" ;; +pairs) + for round in $(seq "$4" "$5"); do + first=$2 second=$3 + if [ $((round % 2)) = 0 ]; then first=$3 second=$2; fi + for version in $first $second; do + quiet + echo "$round $version $(uptime)" >> "$here/$day-load.txt" + python3 research/guard.py -- python3 benchmarks/tpcc/run.py --serve "$builds/$version/pure-serve" --warehouses 1 \ + --check 0 --terminals 64 --sqlite-threads '' --sqlite-group '' --seconds 20 \ + > "$here/$day-tpcc-$version-$round.jsonl" + python3 research/guard.py -- python3 benchmarks/bank/queries.py --serve "$builds/$version/pure-serve" \ + > "$here/$day-queries-$version-$round.jsonl" + done + done ;; +counts) + python3 research/guard.py -- python3 research/experiments/025-i64-cost/count.py "$builds/$2/pure-serve" \ + "$builds/$3/pure-serve" "$builds/$2/pure-serve" "$builds/$3/pure-serve" > "$here/$day-counts.jsonl" ;; floor) for mode in 0 1 2; do cc -O2 -std=c17 -DMODE=$mode -o "$builds/floor-$mode" $here/floor.c -lm quiet python3 research/guard.py --most 2048 -- "$builds/floor-$mode" "$2" >> "$here/$day-floor.jsonl" done ;; -*) echo "runs.sh build NAME COMMIT | suite NAME ROUNDS | floor ROUNDS" >&2 +*) echo "runs.sh build NAME COMMIT | suite NAME ROUNDS | floor ROUNDS | serve NAME COMMIT | pairs A B FIRST LAST | counts A B" >&2 exit 2 ;; esac |
