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
- 9edcc2dflog: #58 live, HM57 startedmre
- 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
- 14195720log: HM49B done, HM51 startedmre
- 78ee6b56Move remaining component styles into Style blocksmre
- 7f04de33log: HM49Bmre
- 00616cf3log: #49 batch merged, DP67 startedmre
- d7232e86Merge hm49-styles: tracker#49 first batch of component stylesmre
- 079f376dMove seven components' styles into Style blocksmre
- 17d66feelog: #58 mergedmre
- 69a6640bMerge hm58-map: tracker#58 project.hl only the mapmre
- a85f7900Move route logic out of the project mapmre
- 13dea5belog: #56 live, HM49 and HM58 startedmre
- a31c8f2fdocs: tracker#36 remaining listmre
- 975d06d1log: #36 live, DP66 startedmre
- d6d03fa3mission: T36Bmre
- e7512d00status: #36 rolled back, retry askedmre
- c98e2043log: T36A rollbackmre
- ae905f15Merge t36a: tracker#36 apply rechecks, reportmre
- 796bfaceT36A: report validated fixes, failed live SSH check and verified rollbackmre
- 55257852log: #53 live, #56 mergedmre