#!/usr/bin/env bash # One start per configuration with the Linux page cache emptied first (a freshly pulled container image or a freshly scheduled pod). # 5 repetitions each, interleaved. Needs root (writes /proc/sys/vm/drop_caches). source "$(dirname "$0")/lib.sh" R="${1:-5}" declare -A res for r in $(seq 1 "$R"); do for c in plain-temurin aot-traffic crac-warm native; do sync; echo 3 > /proc/sys/vm/drop_caches v=$($TOOL once "$c" | python3 -c 'import json,sys; print(round(json.load(sys.stdin)["ready"]))') res[$c]="${res[$c]} $v" done done { echo "ready (ms) after dropping the page cache, $R rounds, interleaved:"; for c in plain-temurin aot-traffic crac-warm native; do echo " $c:${res[$c]}"; done; } | tee "$OUT/09-cold-cache.txt"