test(load): 1분 페이지 동시 부하 계측을 추가한다
국가 권한 사용자 10명과 800 NPC fixture를 만들고 Chromium 화면 순환, SSE, wall-clock 턴을 같은 시각에 측정한다.
This commit is contained in:
@@ -5,10 +5,22 @@ import path from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
||||
import { validateLoadConfig } from '../src/config.js';
|
||||
import { activateCapacityCoverage, assertFixtureIsolation, prepareCapacitySecrets } from '../src/fixture.js';
|
||||
import {
|
||||
activateCapacityCoverage,
|
||||
assertFixtureIsolation,
|
||||
prepareCapacitySecrets,
|
||||
privilegedViewerPlacement,
|
||||
} from '../src/fixture.js';
|
||||
|
||||
const samplePath = new URL('../config/300-users-900-npcs-5m.json', import.meta.url);
|
||||
|
||||
void test('viewer placement stays in one nation and covers every privileged chief level deterministically', () => {
|
||||
assert.deepEqual(
|
||||
Array.from({ length: 10 }, (_, index) => privilegedViewerPlacement(index, 3, 7)),
|
||||
[12, 10, 8, 6, 11, 9, 7, 5, 12, 10].map((officerLevel) => ({ nationId: 3, cityId: 7, officerLevel }))
|
||||
);
|
||||
});
|
||||
|
||||
void test('fixture accepts only the configured private schema and dedicated Redis database', async () => {
|
||||
const config = validateLoadConfig(JSON.parse(await readFile(samplePath, 'utf8')));
|
||||
assert.doesNotThrow(() =>
|
||||
|
||||
Reference in New Issue
Block a user