Performance benchmark on a big network, posted on every PR
scripts/perf-bench.js times routing, a game day, an action, panels, the NOC dashboard and the map on tests/fixtures/big-network.json (104 POPs, 950 PNIs, 832 caches), base and head in alternating turns, and says whether routing results changed. perf.yml runs it on every PR against the base; perf-comment.yml posts the table as one updated comment. New performance skill, CLAUDE.md rule, PR template and docs.
This commit is contained in:
parent
ad8b1bebcb
commit
308c3f7045
13 changed files with 322 additions and 1 deletions
1
tests/fixtures/big-network.json
vendored
Normal file
1
tests/fixtures/big-network.json
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -92,3 +92,13 @@ test('in-app release notes stay short and link to the full notes on GitHub', ()
|
|||
assert.equal(ev(`slimNote('${'x'.repeat(300)}')`).length <= 140, true);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('the big-network benchmark save loads cleanly and routes traffic', () => {
|
||||
const fs = require('node:fs'), path = require('node:path');
|
||||
const save = fs.readFileSync(path.join(__dirname, 'fixtures', 'big-network.json'), 'utf8');
|
||||
const { ev, errors } = load();
|
||||
ev(`S=migrate(JSON.parse(${JSON.stringify(save)}));UI.started=true;compute();renderAll()`);
|
||||
assert.ok(ev('Object.keys(S.pops).length') >= 100 && ev('S.pni.length') >= 900 && ev('S.caches.length') >= 800, 'still a big network');
|
||||
assert.ok(ev('R.served') > 10000, 'and it carries traffic');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue