feat(release): add phase10 tests, smoke load script, release checklist, and onboarding simulator flow
This commit is contained in:
26
Backend/scripts/load-smoke.ts
Normal file
26
Backend/scripts/load-smoke.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
const baseUrl = process.env.LOAD_BASE_URL ?? 'http://localhost:3000';
|
||||
const rounds = Number(process.env.LOAD_ROUNDS ?? 25);
|
||||
|
||||
const run = async () => {
|
||||
const start = Date.now();
|
||||
|
||||
for (let i = 0; i < rounds; i += 1) {
|
||||
const [live, ready, metrics] = await Promise.all([
|
||||
fetch(`${baseUrl}/ops/live`),
|
||||
fetch(`${baseUrl}/ops/ready`),
|
||||
fetch(`${baseUrl}/ops/metrics`),
|
||||
]);
|
||||
|
||||
if (!live.ok || !ready.ok || !metrics.ok) {
|
||||
throw new Error(`Smoke load failed at round ${i + 1}`);
|
||||
}
|
||||
}
|
||||
|
||||
const totalMs = Date.now() - start;
|
||||
console.log(`Completed ${rounds} rounds in ${totalMs}ms`);
|
||||
};
|
||||
|
||||
run().catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user