slowest-tests
Slowest CI tests
Args: [N] [#channel] — both optional. N defaults to 500. If #channel is omitted, just print the table and stop.
1. Gather the data
Run the script. With no build number it auto-picks the most recent finished build from a merged PR.
bun run ci:slowest # top 500 from a recent merged-PR build → TSV on stdout
bun run ci:slowest 47324 100 # specific build, top 100
bun run ci:slowest --json > /tmp/slow.json
The script (scripts/ci-slowest-tests.ts) does the heavy lifting:
- Lists
test-bunjobs frombk build view <N>, skippingretried: true. - Fetches each job's
raw_log_urldirectly withAuthorization: Bearer $BUILDKITE_TOKEN. Do not usebk job log— it hangs indefinitely on some Windows/alpine jobs. - Caches logs to
$TMPDIR/bun-ci-logs-<build>/so re-runs are instant.
More from oven-sh/bun
zig-system-calls
Guides using bun.sys for system calls and file I/O in Zig. Use when implementing file operations instead of std.fs or std.posix.
137writing-dev-server-tests
Guides writing HMR/Dev Server tests in test/bake/. Use when creating or modifying dev server, hot reloading, or bundling tests.
85implementing-jsc-classes-cpp
Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.
80writing-bundler-tests
Guides writing bundler tests using itBundled/expectBundled in test/bundler/. Use when creating or modifying bundler, transpiler, or code transformation tests.
79implementing-jsc-classes-zig
Creates JavaScript classes using Bun's Zig bindings generator (.classes.ts). Use when implementing new JS APIs in Zig with JSC integration.
79javascriptcore-garbage-collector
JSC GC reference for Bun. Use for use-after-free, JS object leaks, "collected too early", or when touching WriteBarrier, visitChildren, visitAdditionalChildren, JSRef, JSC::Strong/Weak, hasPendingActivity, ensureStillAlive, addOpaqueRoot, reportExtraMemoryAllocated, IsoSubspace, HeapAnalyzer, finalize.
2