From 93261d1c157e50f1ed2bbc14cf68f2822553b69c Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 4 Oct 2026 10:31:09 +0100 Subject: Measure how long an app changing module cannot answer, against a host restart (030) An app of a million items (a list grown by doubling) or of a thousand, in a host of apps, its store in RAM: the longest gap between two answered writes while it changes module on SIGHUP (stopped and started again from its store, 71e319b), and while the host is restarted. A thousand items: 1.59 ms against 3.05 (median of 20 and 10). A million: 150.64 ms against 149.73 (10 and 5): both are the store read again (pure_app_start, 142 ms), so changing does not answer sooner than restarting. --- research/experiments/030-app-lifecycle/runs.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 research/experiments/030-app-lifecycle/runs.sh (limited to 'research/experiments/030-app-lifecycle/runs.sh') diff --git a/research/experiments/030-app-lifecycle/runs.sh b/research/experiments/030-app-lifecycle/runs.sh new file mode 100755 index 0000000..601f754 --- /dev/null +++ b/research/experiments/030-app-lifecycle/runs.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# The runs of research 115 (docs/design/017's stage 3), from the repository's +# root, in steps, each under research/guard.py: +# runs.sh build NAME COMMIT pure-serve of COMMIT, with its pure-crypto.so, +# in ~/.cache/pure-030/NAME +# runs.sh window NAME ITEMS CHANGES RESTARTS [MODULE] window.py on that +# build, into DATE-window-NAME-ITEMS[-MODULE].jsonl +set -e +out=research/experiments/030-app-lifecycle +builds=$HOME/.cache/pure-030 +day=$(date +%F) +case "$1" in +build) + 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" ;; +window) + until awk '{ exit !($1 < 1.5) }' /proc/loadavg; do sleep 10; done + python3 research/guard.py --most 2048 -- python3 $out/window.py "$builds/$2/pure-serve" "$3" "$4" "$5" ${6:+"$6"} \ + > "$out/$day-window-$2-$3${6:+-$6}.jsonl" ;; +*) echo "runs.sh build NAME COMMIT | window NAME ITEMS CHANGES RESTARTS [MODULE]" >&2; exit 2 ;; +esac -- cgit v1.2.3