repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

Clamp negative experiment and checks timeouts to zero

17e8520c5b8ffeeba63b0b033d9092e2d0aad38c

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Result: {"status":"keep","wall_time":500,"tests_passed":46,"failures":0}

Changed files (1)

extensions/tune/index.ts

Modified
1640 1640 updateWidget(ctx);
1641 1641 if (overlayTui) overlayTui.requestRender();
1643 - const timeout = (params.timeout_seconds ?? 600) * 1000;
1643 + const timeout = Math.max(0, params.timeout_seconds ?? 600) * 1000;
1644 1644 const t0 = Date.now();
1645 1645 const getTempFile = createTempFileAllocator();
1798 1798 const checksPath = tuneChecksPath(cwd);
1799 1799 if (benchmarkPassed && fs.existsSync(checksPath)) {
1800 - const checksTimeout = (params.checks_timeout_seconds ?? 300) * 1000;
1800 + const checksTimeout = Math.max(0, params.checks_timeout_seconds ?? 300) * 1000;
1801 1801 const ct0 = Date.now();
1803 1803 const checksResult = await pi.exec("node", [checksPath], {