tracker
All repositories: gitoria
1.2 KB
// tests/realdata-018-poll.mjs — tracker#18 real-data check: page latency WHILE the daily run works (hl:web serves one request at// a time; a sync step blocks it). Polls REAL_PATHS in turn every 0.5 s until the server log (REAL_LOG) says "tmdb sync done",// then prints n / median / p95 / p99 / max in ms and the 5 slowest.// REAL_PORT=8750 REAL_LOG=.scratch/w067-delta.log node tests/realdata-018-poll.mjsimport { readFileSync } from 'node:fs';const BASE = `http://127.0.0.1:${process.env.REAL_PORT || 8750}`;const LOG = process.env.REAL_LOG;const PATHS = (process.env.REAL_PATHS || '/,/movies,/shows').split(',');const lat = [];let i = 0;while (!readFileSync(LOG, 'utf8').includes('tmdb sync done')) {const p = PATHS[i++ % PATHS.length], t0 = Date.now();try { await (await fetch(BASE + p)).text(); } catch {}lat.push({ p, ms: Date.now() - t0, at: new Date(t0).toISOString().slice(11, 19) });await new Promise(r => setTimeout(r, 500));}const s = lat.map(l => l.ms).sort((a, b) => a - b), q = (f) => s[Math.min(s.length - 1, Math.floor(f * s.length))];console.log(`n=${s.length} median=${q(0.5)} p95=${q(0.95)} p99=${q(0.99)} max=${s[s.length - 1]} ms`);console.log('slowest:', JSON.stringify([...lat].sort((a, b) => b.ms - a.ms).slice(0, 5)));
Branches
Latest commits
- cb78a1a0HM65 report missing heap diagnostic package with repromre
- 89606a5cHM65 briefmre
- 096ce0d4log: DP69 live on day48mre
- b3d8a80bDP69 brief, RV48 mergedmre
- ce6d7d32Merge rv48: Hybriel day48mre
- 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
- 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
- 4a802ae7status: RV48 runningmre
- 0a5412b6RV48 brief, day48 outmre
- 56665efelog: CB69 mergedmre
- 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
- e55b379dKeep shared app title independent of the route import graphmre
- 9a99659blog: hybriel#334, batch waits for day48mre
- 85fa6c9blog: CB68 result, CB69 startedmre
- 2f07c1b7log: DP68 boot gate failed, CB68mre
- 9652782dlog: HM59 merged, DP68 startedmre
- 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
- f7bfe90bMove remaining page builders into their topicsmre
- 7c3991f9log: day46 from Antonmre
- ec54fc35Move show page logic into the shows topicmre