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

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

Описание и применение

Баннер Bun значительно ускорил выполнение тестов, сократил потребление памяти и уменьшил время холодного старта по сравнению с Jest и Vitest, что позволило экономить ресурсы GitHub Actions.

Задача

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

Результат

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.

Рабочий процесс

  • 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

Доказательства

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

Источник

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

Источник

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.

Источник

  • Дата записи: 2026-10-20T11:56:06.801Z