Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions __tests__/router-cold-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ const ROUTER = resolve(__dirname, "..", "servers", "_router.ts");
// Under `bun test`, a parent bun process is already running so child bun
// spawns contend for CPU — adds ~50-100ms of scheduling overhead. 300ms is
// the bound that catches genuine regressions (a regressed router would take
// 500ms+ per run) while remaining stable across CI environments.
const TARGET_MEDIAN_MS = 300;
// 500ms+ per run) while remaining stable across POSIX CI.
//
// Windows hosted runners are virtualized + antivirus-scanned, which can push
// child bun spawn well past 1s without any real regression. We use a separate,
// looser bound there (still well under "regressed router" levels) so the
// assertion catches actual perf regressions without flaking on slow VMs.
const TARGET_MEDIAN_MS = process.platform === "win32" ? 1500 : 300;

const INIT_REQUEST =
JSON.stringify({
Expand Down
Loading