Agent Harness
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
const { chromium } = require("playwright-core");
(async () => {
const b = await chromium.launch({ args: ["--force-device-scale-factor=1"] });
const p = await b.newPage({ viewport: { width: 1280, height: 720 }, deviceScaleFactor: 1 });
await p.addInitScript(() => {
window.__frames = []; let prev = 0, t0 = 0;
const tick = (t) => { if (!t0) t0 = t; if (prev) window.__frames.push([+(t - t0).toFixed(1), +(t - prev).toFixed(2)]); prev = t; requestAnimationFrame(tick); };
requestAnimationFrame(tick);
});
await p.goto("http://localhost:5173/arena/", { waitUntil: "networkidle" });
await p.waitForTimeout(1500);
await p.waitForTimeout(12000);
const r = await p.evaluate(() => {
const f = window.__frames.slice();
const sp = f.filter((x) => x[1] > 20);
const all = f.map((x) => x[1]).sort((a, b) => a - b);
return { n: f.length, p50: all[Math.floor(all.length * 0.5)], p99: all[Math.floor(all.length * 0.99)], max: all[all.length - 1], spikes: sp.slice(0, 20) };
});
console.log(JSON.stringify(r));
await b.close();
})();