feat: initialize sunrise with 100-player shared rooms

This commit is contained in:
2026-10-30 16:36:35 +09:00
commit 31d6eac4c2
257 changed files with 66063 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { frameSummary } from '../src/scene/frameSummary.ts';
test('frame summary uses nearest-rank p95 and retains long foreground stalls', () => {
const values = [...Array(94).fill(16), ...Array(5).fill(40), 500];
const result = frameSummary(values);
assert.equal(result.p95Ms, 40);
assert.equal(result.meanMs, 22.04);
assert.equal(result.over50Ms, 1);
assert.equal(result.overBudget, 6);
assert.ok(Math.abs(result.fps! - 1000 / 22.04) < 1e-10);
});
test('empty render sample cannot be reported as passing FPS', () => {
assert.equal(frameSummary([]).fps, null);
assert.equal(frameSummary([]).p95Ms, null);
});