INNER CODE UNIT · TypeScript

s

SveltyCMS/SveltyCMS · scripts/benchmark-matrix/index.ts:392

  const s = Math.round(seconds % 60);
  return `${m}m ${s}s`;
}

function isHealthReady(data: Record<string, unknown>): boolean {
  const status = String(data.overallStatus ?? data.status ?? "").toUpperCase();
  const db = data.database;
  const dbOk = db === true || db === "connected";
  const readyStates = new Set(["READY", "WARMED", "DEGRADED"]);
  // 🔴 READINESS TRUTHFULNESS (2026-09-28): `overallStatus` alone let a server
  // that was still warming its boot cache count as ready, so every benchmark leg
  // measured the warm-up itself. The server now reports a strict `ready` flag
  // (DB connected AND the boot pre-warm settled); require it when present —
  // `undefined` keeps older builds runnable.
  return readyStates.has(status) && dbOk && data.ready !== false;
}

async function waitForServerReady(url: string, maxAttempts = 90): Promise<boolean> {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…