diff options
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 |
