Skip to content

Repository files navigation

bootgly-logo

Bootgly_Benchmarks ⏱️

Benchmarks comparing Bootgly with alternatives.

Bootgly License

📊 Benchmark Cases

Benchmarks Interface Result
Progress Bar CLI ≈ 7x faster than Laravel / Symfony Progress Bar to render 250k iterations
Template Engine - foreach ABI ≈ 9x faster than Laravel Blade (without sacrificing features)
HTTP Server CLI WPI TechEmpower benchmark: 6 canonical routes (/plaintext, /json, /db, /query, /fortunes, /updates) vs opponents
Cache ABI Per-driver × per-operation matrix (File / APCu / Shared / Redis): store, fetch, increment, tags, resolve, ...
TCP Server CLI WPI Raw socket-level throughput (accept, read, write, close) — no HTTP routing/middleware. Loads: echo + raw HTTP
UDP Server CLI WPI Raw datagram echo throughput — no TCP framing. One datagram in → one echoed out

🐳 Quickstart (0 setup with Docker)

The flagship HTTP Server CLI cross-framework benchmark runs from one command — no install, no config, no database setup. It pulls a self-contained image (Bootgly + the opponent + PostgreSQL, which boots and seeds itself) and prints the full benchmark: Bootgly vs the opponent, static and database routes.

Benchmark Bootgly against Swoole on the TechEmpower load set:

docker run --rm bootgly/bootgly_benchmarks:swoole \
   test benchmark HTTP_Server_CLI --opponents=bootgly,swoole --loads=techempower:*

The only requirement is a running Docker daemon. Swap the image tag / opponent for any published one:

<image> <opponent> Published
swoole swoole
workerman workerman
reactphp reactphp
amphp amphp
roadrunner roadrunner
hyperf hyperf
laravel-octane laravel-octane
frankenphp frankenphp
docker run --rm bootgly/bootgly_benchmarks:<image> \
   test benchmark HTTP_Server_CLI --opponents=bootgly,<opponent> --loads=techempower:*

✅ published to Docker Hub. frankenphp bundles the official static binary, which already embeds pdo_pgsql/pgsql, so its TechEmpower DB routes run in the self-contained image. Tuning passes straight through (--server-workers=15 --connections=512 --duration=10); override the bundled DB with -e DB_HOST=… -e DB_PORT=…. Full details: HTTP Server CLI Quickstart.


🚀 Getting Started

1. Clone both repositories side by side

git clone https://github.com/bootgly/bootgly.git
git clone https://github.com/bootgly/bootgly_benchmarks.git

Expected directory layout:

parent/
├── bootgly/
└── bootgly_benchmarks/

2. Run a benchmark

cd bootgly
./bootgly test benchmark <CASE>

Available cases:

./bootgly test benchmark HTTP_Server_CLI
./bootgly test benchmark TCP_Server_CLI
./bootgly test benchmark UDP_Server_CLI
./bootgly test benchmark Progress_Bar
./bootgly test benchmark Template_Engine
./bootgly test benchmark Cache

Docker (cross-framework): the HTTP_Server_CLI case ships each cross-framework opponent (Swoole, Hyperf, Workerman, RoadRunner, ReactPHP, AMPHP, Laravel Octane) as a self-contained imagebootgly/bootgly_benchmarks:<opponent> bundles Bootgly + the opponent runtime + PostgreSQL and runs the whole benchmark from one docker run (zero host setup). See the HTTP Server CLI Docker Quickstart for copy-paste commands.

3. Get help

# List available cases
./bootgly test benchmark --help

# Show case-specific options
./bootgly test benchmark HTTP_Server_CLI --help

🏗️ Architecture

The benchmark framework lives in bootgly/Bootgly/ACI/Tests/Benchmark/ and provides:

  • Configs — parsed CLI options (--opponents, --runner, --loads, --output, --format, --results)
  • Options — per-case options.php schema (declares case options such as --server-workers, incl. sweep values: 1..24, 1..24:4, 1,2,4)
  • Opponents — a named entry (with version and script path) to benchmark against
  • Runner — abstract executor that drives each benchmark. Built-in runners:
    Runner CLI Name Use Case
    Code code Local code execution (time + memory)
    TCP_Client tcp_client HTTP load testing via Bootgly's TCP client
  • Load — a request distribution script (PHP for TCP_Client)

Each benchmark case has a autoboot.php entry-point that selects a runner, configures it, and registers opponents.

About

⏱️ Benchmark Bootgly against PHP and JS alternatives (Swoole, Workerman, FrankenPHP, RoadRunner, Hyperf, Octane, Express/Node.js, Bun) — self-contained one-command Docker images

Resources

Stars

Watchers

Forks

Contributors

Languages