Comment by omoikane
It just fakes it as far as I can tell.
script.js calls `fetchStatus()`, which calls `generateMockStatus()` to get the statuses, which just makes up random response times:
// ---- generate deterministic mock data for the current 3-min window ----
function generateMockStatus() {
const bucket = getCurrentBucket();
const rng = createRng(bucket);
// "Virtual now" = middle of this 3-minute bucket
const virtualNowMs = bucket * BUCKET_MS + BUCKET_MS / 2;
// Checked a few minutes ago (2–5 min, plus random seconds)
const minutesOffset = randomInt(rng, 2, 5);
const secondsOffset = randomInt(rng, 0, 59);
const checkedAtMs =
virtualNowMs - minutesOffset * 60_000 - secondsOffset * 1000;
const checkedAtDate = new Date(checkedAtMs);
return {
checkedAt: checkedAtDate.toISOString(),
target: "https://downdetector.com/",
regions: [
{
name: "London, UK",
status: "up",
httpStatus: 200,
responseTimeMs: randomInt(rng, 250, 550),
error: null
},
{
name: "Auckland, NZ",
status: "up",
httpStatus: 200,
responseTimeMs: randomInt(rng, 300, 650),
error: null
},
{
name: "New York, US",
status: "up",
httpStatus: 200,
responseTimeMs: randomInt(rng, 380, 800),
error: null
}
]
};
}