Skip to content

A tiny benchmark script for testing BunJS and NodeJS running BullMQ

Notifications You must be signed in to change notification settings

taskforcesh/bullmq-bun-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BullMQ Runtime Benchmark

Benchmark comparing BullMQ performance on Node.js vs Bun runtimes.

Prerequisites

  • Node.js v18+
  • Bun v1.0+
  • Redis server running on localhost (or set REDIS_HOST env var)

Installation

# Using npm
npm install

# Using Bun (faster)
bun install

Running Benchmarks

There are two benchmark scripts:

  • benchmark.js - Simple JavaScript benchmark
  • runtime-comparison.ts - Comprehensive TypeScript benchmark with more tests

Simple Benchmark (JavaScript)

# Node.js
npm run bench:node

# Bun
npm run bench:bun

Comprehensive Benchmark (TypeScript)

# Node.js (using tsx)
npm run bench:node:ts

# Bun
npm run bench:bun:ts

Benchmark Tests

  1. Job Addition - Adding 1000 jobs individually using Queue.add()
  2. Bulk Addition - Adding 5000 jobs at once using Queue.addBulk()
  3. Job Processing - Processing 1000 jobs with concurrency=10
  4. Flow Producer - Creating 100 flows with 2 children each

Environment Variables

  • REDIS_HOST - Redis host (default: localhost)

License

MIT

About

A tiny benchmark script for testing BunJS and NodeJS running BullMQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published