Runs cold-start macrobenchmark only, then prints a compact summary.
Also saves a timestamped snapshot JSON under benchmark/results/. If --baseline is omitted, compares against latest previous snapshot when available.
EOF
}
while [[ $# -gt 0 ]]; do
case "$1" in
--baseline)
BASELINE_JSON="${2:-}"
shift 2
;;
-h|--help)
usage
exit 0
;;
*) echo"Unknown arg: $1" >&2
usage >&2
exit 2
;;
esac done
if ! command -v jq >/dev/null 2>&1; then echo"jq required but missing." >&2
exit 1 fi
if ! command -v adb >/dev/null 2>&1; then echo"adb required but missing." >&2
exit 1 fi
device_count="$(adb devices | awk 'NR>1 && $2=="device" {c+=1} END {print c+0}')" if [[ "$device_count" -lt 1 ]]; then echo"No connected Android device (adb state=device)." >&2
exit 1 fi
if [[ -z "$BASELINE_JSON" ]]; then
BASELINE_JSON="$(
find "$RESULTS_DIR" -name 'startup-*.json' -type f \
| while IFS= read -r file; do if [[ "$file" == "$snapshot_json" ]]; then
continue fi
printf '%s\t%s\n'"$(stat -f '%m' "$file")""$file" done \
| sort -nr \
| head -n1 \
| cut -f2-
)" fi
if [[ -n "$BASELINE_JSON" ]]; then if [[ ! -f "$BASELINE_JSON" ]]; then echo"Baseline file missing: $BASELINE_JSON" >&2
exit 1 fi
base_median="$(jq -r '.benchmarks[] | select(.name=="coldStartup") | .metrics.timeToInitialDisplayMs.median' "$BASELINE_JSON")"
delta_ms="$(awk -v a="$median_ms" -v b="$base_median" 'BEGIN { printf "%.3f", (a-b) }')"
delta_pct="$(awk -v a="$median_ms" -v b="$base_median" 'BEGIN { if (b==0) { print "nan" } else { printf "%.2f", ((a-b)/b)*100 } }')" echo"baseline_median_ms=$base_median delta_ms=$delta_ms delta_pct=$delta_pct%" fi
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.22 Sekunden
(vorverarbeitet am 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.