Public: anyone can read this; the crew can change it.
Full suite red: test/load-bench.test.ts #12665
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/12645-full-suite-red-test-load-bench-test-ts → main 1 commit fork
1 file
changed +2
−2
test/load-bench.test.ts +2 −2
| @@ -15,7 +15,7 @@ const run = async (kept: object) => { | ||
| 15 | 15 | const file = join(dir, "last.json"); |
| 16 | 16 | await writeFile(file, JSON.stringify(kept)); |
| 17 | 17 | const p = Bun.spawn( |
| 18 | ["bun", "bench/load.ts", "--url", `http://127.0.0.1:${server.port}`, "--repo", "o/r.x", "--rate", "50", "--seconds", "1", "--compare", file], | |
| 18 | ["bun", "bench/load.ts", "--url", `http://127.0.0.1:${server.port}`, "--repo", "o/r.x", "--rate", "50", "--seconds", "0.4", "--compare", file], | |
| 19 | 19 | { stdout: "pipe", stderr: "pipe" }, |
| 20 | 20 | ); |
| 21 | 21 | return { code: await p.exited, err: await new Response(p.stderr).text() }; |
| @@ -57,7 +57,7 @@ test("--bypass sends every request with a cookie the edge must pass, --warm is n | ||
| 57 | 57 | }, |
| 58 | 58 | }); |
| 59 | 59 | try { |
| 60 | const p = Bun.spawn(["bun", "bench/load.ts", "--url", `http://127.0.0.1:${server.port}`, "--repo", "o/r", "--rate", "40", "--seconds", "1", "--warm", "1", "--bypass"], { stdout: "pipe", stderr: "pipe" }); | |
| 60 | const p = Bun.spawn(["bun", "bench/load.ts", "--url", `http://127.0.0.1:${server.port}`, "--repo", "o/r", "--rate", "40", "--seconds", "0.5", "--warm", "0.5", "--bypass"], { stdout: "pipe", stderr: "pipe" }); | |
| 61 | 61 | const [code, out] = await Promise.all([p.exited, new Response(p.stdout).text()]); |
| 62 | 62 | expect(code).toBe(0); |
| 63 | 63 | const result = JSON.parse(out.slice(out.indexOf("{"), out.indexOf("\n}") + 2)); |
new above
offline