Skip to content

Performance benchmarks

Pondoknusa ships a benchmark harness for baseline throughput on HTTP, ORM, views, middleware, and boot paths.

Run locally

Build the workspace first, then:

bash
npm run benchmark

JSON output for CI or dashboards:

bash
npm run benchmark -- --json

Quick smoke mode (fewer samples):

bash
BENCHMARK_QUICK=1 npm run benchmark

What is measured

BenchmarkKeyWhat it exercises
Boot cold startboot.coldApplicationserve() listen
HTTP JSONhttp.jsonIn-process GET /bench JSON responses
HTTP JSON fast pathhttp.json.fastSession-skipped API route with request pooling
Middleware stackmiddleware.stackFull kernel middleware on a simple route
Session authsession.authSession + auth middleware on a protected route
HTTP SSRhttp.ssrFull-stack welcome.tyr through HttpKernel
ORM selectorm.selectModel.all() against 100 seeded SQLite rows
View compileview.compileCompiling welcome.tyr
View renderview.renderRendering welcome.tyr with context

Competitive JSON baselines

Same machine, same Node version, same GET /bench{ "ok": true } payload, same fetch client and sample sizes:

BenchmarkKeyFramework
Compare Pondoknusacompare.pondoknusaPondoknusa HttpKernel
Compare Expresscompare.expressExpress 5
Compare Fastifycompare.fastifyFastify 5
Compare Honocompare.honoHono + @hono/node-server

These are informational baselines on a minimal JSON route — not a full framework shootout. Pondoknusa’s value is the integrated stack (ORM, views, auth, queues). Use competitive rows to sanity-check HTTP overhead, not to pick a winner in isolation.

Throughput varies with CPU, Node version, and concurrent load.

Latest CI numbers

Latest CI snapshot (quick mode)

Node 26.3.1 on linux/x64 — updated 2026-06-28.

BenchmarkKeyValueUnit
Cold boot to HTTP listenboot.cold4ms
HTTP JSON responseshttp.json1,164req/s
HTTP JSON fast path (session skipped, request pool)http.json.fast1,241req/s
HTTP JSON with 3-middleware stackmiddleware.stack1,342req/s
HTTP JSON with session + auth middlewaresession.auth26req/s
HTTP SSR welcome.tyr through HttpKernelhttp.ssr667req/s
ORM select all (100 rows, SQLite memory)orm.select7,205ops/s
Compile welcome.tyr templateview.compile27,507ops/s
Render welcome.tyr templateview.render669ops/s

View workflow runs for historical artifacts.

If the snapshot is missing locally, run npm run benchmark -- --json > benchmark-report.json then node scripts/benchmark-snapshot.mjs benchmark-report.json.

Interpreting results

  • req/s and ops/s are rounded integers derived from total samples divided by elapsed milliseconds.
  • Compare runs on the same machine and Node version when tracking regressions.
  • Use the observability cookbook for production latency — benchmarks do not replace real traffic profiling.

CI trend artifacts

On every push to main, the Benchmarks workflow runs quick-mode benchmarks (BENCHMARK_QUICK=1), compares against the previous baseline (warns on >15% drop), and uploads a JSON artifact named benchmark-report-<sha>.

A weekly full benchmark runs every Monday with BENCHMARK_QUICK=0, larger sample sizes, and 365-day artifact retention for trend charts.

The job is informational only — it does not fail the build on regressions. Use it to spot large swings before they reach production profiling.

Expected ranges (Node 26, Linux CI, quick mode)

GitHub-hosted ubuntu-latest runners are noisy; treat these as ballpark ranges, not pass/fail gates:

BenchmarkTypical range
http.json800 – 3,000 req/s
http.json.fast1,200 – 4,000 req/s
http.ssr200 – 800 req/s
orm.select5,000 – 20,000 ops/s
view.compile20,000 – 60,000 ops/s
view.render2,000 – 8,000 ops/s
boot.cold50 – 200 ms

Full local runs (BENCHMARK_QUICK=0) use larger sample sizes and usually report higher throughput on a dedicated machine.

Bun vs Node

Pondoknusa targets Node.js 26+ as the production runtime. Bun can run Pondoknusa for development and experiments:

bash
bun run npm run benchmark

Observed patterns (informal, machine-dependent):

AreaBunNode 26
HTTP throughputOften 1.1–1.4× Node on simple JSON routesStable baseline; use for CI regression gates
Boot timeComparable or slightly fasterReference for production deploys
node:sqlite ORM benchRequires Node built-in moduleFully supported
Ecosystem driversVerify per driver packageRecommended for Postgres/MySQL/Redis

Use Node for production deploys and CI gates. Use Bun optionally for local dev velocity when your driver stack supports it.

  • Performance — boot checklist, pool sizing, caching
  • Deployment — horizontal scaling and worker sizing
  • Observability cookbook — health probes, structured logs, queue failure signals
  • Testing — feature and integration coverage alongside perf baselines

Released under the MIT License.