tracker
All repositories: gitoria
2.1 KB
// tests/realdata-018.mjs — tracker.worldapi.org#18, NOT the gate: titles the daily delta run refreshed, on a COPY of live storage/// (STATUS.md "ticket #18"). Per title in REAL_TITLES and width (390, 1280): full page load, the header as shown (title, tagline,// summary start), a screenshot to $REAL_OUT.// Env: REAL_PORT (8750), REAL_CHROME (8757-8759), REAL_OUT (/tmp/w067/real), REAL_TITLES ('Star-Wars-Andor,Breaking-Bad').import { writeFileSync, mkdirSync } from 'node:fs';import { launchBrowser } from './cdp.mjs';process.env.HL_CHROME ||= '/opt/google/chrome/chrome';const BASE = `http://127.0.0.1:${process.env.REAL_PORT || 8750}`, OUT = process.env.REAL_OUT || '/tmp/w067/real';mkdirSync(OUT, { recursive: true });const [CH_FROM, CH_TO] = (process.env.REAL_CHROME || '8757-8759').split('-').map(Number);const TITLES = (process.env.REAL_TITLES || 'Star-Wars-Andor,Breaking-Bad').split(',').filter(Boolean);const browser = await launchBrowser({ debugPortRange: [CH_FROM, CH_TO || CH_FROM] });const page = await browser.newPage();const ev = (e) => page.evaluate(e);const hydrated = () => page.waitFor('!!window.__hl && window.__hl.socket && window.__hl.socket.readyState === 1 && document.readyState === "complete"', { timeout: 30000, label: 'hydrated' });for (const slug of TITLES) {for (const w of [390, 1280]) {const mobile = w < 600;await page.send('Emulation.setDeviceMetricsOverride', { width: w, height: mobile ? 844 : 900, deviceScaleFactor: mobile ? 2 : 1, mobile });const t0 = Date.now();await page.goto(BASE + '/shows/' + slug); await hydrated();const load = Date.now() - t0;const head = await ev(`JSON.stringify({ h1: (document.querySelector('show-header h1') || {}).textContent || null, summary: ((document.querySelector('show-summary') || {}).textContent || '').slice(0, 120), scrollW: document.documentElement.scrollWidth })`);writeFileSync(`${OUT}/${slug}-${w}.png`, Buffer.from((await page.send('Page.captureScreenshot', { format: 'png' })).data, 'base64'));console.log(`${slug} @${w}: full load ${load} ms ${head}`);}}console.log('problems', JSON.stringify(page.problems()));await browser.close();
Branches
Latest commits
- 1f2df72amission RV39mre
- 6c1936f9log+status: GC planmre
- 2846a840log: m569 result, GC hypothesismre
- b24cd2d5log: Anton on hl:fetch, mission 569mre
- 7d42cac1log+status: SL1 measured, fetch stalls remainmre
- 8e5f2ceflog: SL1 deployedmre
- 29f34212log: SL1 deploy startedmre
- 529dd741Merge sl1-slices: slice details repair and person fill (SL1)mre
- 8a83316blog: SL1 result, session drain slowermre
- 35e93e8dSL1: slice the details repair and person fill: catalog lists changed in place, 40 ms fill steps, people created in steps, writes one table per tickmre
- 72c9119flog+status: SL1 startedmre
- d74620fcmission SL1: slice repair and person fillmre
- 5d542d73log+status: ST1 resultmre
- 3945eb81ST1: stall diagnosis reportmre
- 404733aclog: ST1 startedmre
- 3e3d5a55mission ST1: stall diagnosismre
- 9c3180eblog+status: RV28d measured after deploymre
- fdf10b1alog: RV28d deployed on day38bmre
- 320005e9log: RV28d merged, deploy runningmre
- a8fef27dRV28d: reportmre