Skip to content

bunsvr/benchmark

Repository files navigation

Benchmark

Benchmarking Bun, Node and Deno frameworks performance, in requests per second.

You can see the details results here.

I recommend testing this by yourself as performance may varies on different machine.

Requirements

All tool required to set up and run the benchmark.

Bun

Bun is required to run Bun frameworks and benchmark scripts. See bun.sh.

Bombardier

Go is required to install the bombardier CLI. See go.dev. Install bombardier using:

# Install the CLI without a `go.mod` file
go install -mod=mod github.com/codesenberg/bombardier

# Check after install
bombardier --version

You need to manually set GO_PATH to your extracted go directory, GO_BIN to $GO_PATH/bin and add GO_BIN to PATH if bombardier --version fails.

Start

Clone this reposity. Go to the root directory and run:

# Install required dependencies
bun ins

# Run the benchmark
bun bench

# Or do both
bun start

Configurations

See configuration file and the type declarations.

Results

Chart

Chart

Table

Name Average Text 404 URL params Body validation
Stric 1.0 45580.01 48578.51 47699.93 47294.40 38747.21
Elysia 0.8 43410.22 46948.59 46244.10 42586.50 37861.68
Fastify 4.25 20628.66 26076.87 23738.52 23778.43 8920.81

Frameworks

  • Stric: A web framework for building high-performance, scalable web applications.
  • Fastify: Fast and low overhead web framework, for Node.js.
  • Elysia: Ergonomic Framework for Humans.

About

Benchmarking HTTP frameworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published