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/items.aup | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 research/experiments/030-app-lifecycle/items.aup (limited to 'research/experiments/030-app-lifecycle/items.aup') diff --git a/research/experiments/030-app-lifecycle/items.aup b/research/experiments/030-app-lifecycle/items.aup new file mode 100644 index 0000000..b6d928b --- /dev/null +++ b/research/experiments/030-app-lifecycle/items.aup @@ -0,0 +1,28 @@ +record Item { + n = 0 +} +state items: list of Item +state more: list of Item +state hits = 0 +input seed = message { n: number } +input grow = message { step: number } +input add = message { step: number } +on seed { + items.append(Item { n: seed.n }) +} +on grow { + for i in items { + more.append(Item { n: i.n + grow.step }) + } + for m in more { + items.append(Item { n: m.n }) + } + for m in more { + more.remove(m) + } +} +on add { + hits = hits + add.step +} +view count = count(i in items where i.n > 0) +view total = hits -- cgit v1.2.3