Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Benchmarking Bun's Native Test Runner: Throughput, Memory Overhead, and Cold-Start Latency

Description and use

Bun’s native test runner dramatically reduced test execution time, memory usage, and cold‑start latency compared to Jest and Vitest, enabling cost savings in GitHub Actions CI.

Problem

Determine if Bun’s native test runner offers measurable performance and cost benefits over Jest and Vitest in GitHub Actions CI pipelines.

Outcome

Bun’s native test runner reduced total execution time by 64 % (42 s vs 118 s), cut peak memory to 310 MB, and lowered cold‑start overhead to 1.8 s, enabling more efficient use of GitHub Actions runners and cost savings.

Workflow

  • Run three concurrent GitHub Actions matrix builds against the 2,400-test suite
  • Measure total execution time, peak memory, cold‑start overhead, and throughput for each framework
  • Compare metrics: Bun 42 s/310 MB/1.8 s vs Jest 118 s/890 MB/12.3 s vs Vitest 68 s/520 MB/6.1 s
  • Create hardened GitHub Actions workflow YAML with pinned actions, dependency cache, frozen lockfile, coverage enforcement, and concurrency controls
  • Deploy validation script to enforce linting, type safety, and coverage thresholds before merge
  • Audit and adjust concurrency groups to prevent quota burn

Evidence

Bun's native test runner completed the full suite in 42 seconds compared to Jest's 118 seconds—a 64% reduction.

Source

Peak memory stayed below 320MB while Jest climbed past 890MB during parallel execution.

Source

Cold-start penalty (installing dependencies + test discovery) dropped from Jest's 12.3 seconds to Bun's 1.8 seconds, critical for PR-triggered CI runs without cache hits.

Source

  • Record date: 2026-10-20T11:56:06.801Z