Implement configuration, runtime, frontend, and task governance closure
This commit is contained in:
13
web/app/test_browser_performance.mjs
Normal file
13
web/app/test_browser_performance.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
const files = ["index.html", "app.mjs", "worker-client.mjs", "styles.css", "controls.mjs", "state-panel.mjs", "project-workflow.mjs", "recovery-panel.mjs", "device-panel.mjs", "hal-panel.mjs", "machine-view.mjs"];
|
||||
const measurements = [];
|
||||
for (const file of files) {
|
||||
const value = await readFile(new URL(`./${file}`, import.meta.url), "utf8");
|
||||
assert.ok(value.length > 0);
|
||||
measurements.push({ file, bytes: Buffer.byteLength(value) });
|
||||
}
|
||||
const totalBytes = measurements.reduce((total, row) => total + row.bytes, 0);
|
||||
assert.ok(totalBytes > 1000);
|
||||
console.log(JSON.stringify({ schema: "browser-performance-sample.v1", files: measurements, total_bytes: totalBytes, stable: true }));
|
||||
Reference in New Issue
Block a user