nodefony-load-test

Runs HTTP and WebSocket load, stress, and capacity benchmarks against Nodefony servers with validity controls.

Updated Dec 19, 2023
One-click install
npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-load-test-nodefony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodefony-load-test
Source: https://github.com/nodefony/nodefony-core/tree/main/.claude/skills/nodefony-load-test
Command: npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-load-test-nodefony

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ws, and includes scripts (resource) and references (resource) components.

What problem does it solve? Raw benchmark numbers are easy to produce and easy to get wrong: a closed port can report 1626 RPS, thermal drift can fake a 30% regression, and a variance of 27% makes two measurements unrankable. This Skill turns load-test scripts into trustworthy measurements by enforcing protocols, validity gates, and controlled environments. ## Core Features & Use Cases - Versioned Vitest load suites: CI-stable WebSocket connection/message load tests and memory-leak gates, with rupture probes gated behind NF_RUN_WS_RUPTURE=1. - 31 standalone benchmark scripts: WebSocket connection ceilings, throughput, RPS and percentiles, pod capacity, soak tests for memory leaks, boot-time and HMR-delay measurement, and browserless e2e proofs (idempotence, TOTP, webhooks, rate limiting, graceful shutdown, cluster). - A/B performance benchmarking: bench-ab-mono.sh measures single-process production pipeline cost with alternating pairs, dispersion refusal above 3%, and thermal/indexer machine guards; bench-pairs.sh compares two camps (e.g. Nodefony vs Express/Fastify) with a separation verdict. - Use Case: Before committing a change to the HTTP pipeline, run alternating A/B pairs with bench-ab-mono.sh to confirm the gain exceeds machine noise, then generate an HTML report with bench-report.mjs for human review. ## Quick Start Ask the agent to run a load test against the dev server, for example: start the Nodefony dev server and measure how many concurrent WebSocket connections it sustains using the load-test scripts.

Frequently Asked Questions about nodefony-load-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a load test against a Nodefony server?

Start the dev server first with the nodefony-start-server skill, then run the versioned Vitest suites via scripts/run.sh load, or launch standalone scripts like http-load.mjs and ws-connections.mjs from the repo root. Scripts target port 5152 with TLS by default.

How do I benchmark Nodefony against Express or Fastify?

Use bench-frameworks/bench-pairs.sh with two camp names, for example express-fair versus nodefony. It runs alternating measurement pairs, checks installed versions match package.json, and only reports a result when the two series separate cleanly.

Why does my benchmark show high RPS on a closed port?

A failed connection returns faster than a real response, so error responses inflate throughput numbers. Every bench in this skill verifies the target returns HTTP 200 with the expected payload before measuring and counts only successful responses.

Can I measure production mode performance with the test routes?

Production servers do not load policy:dev modules, so test routes return 404. Use NF_WITH_DEV_MODULES=1 with a TTL, or the dedicated bench route /nodefony/kernel/bench enabled by NF_BENCH_ROUTE=1.

How do I detect a memory leak in a Nodefony server?

Run scripts/soak.mjs for at least 10 minutes with --expose-gc on the server. It fits a heap slope per hour rather than comparing two snapshots, and only declares a leak when duration, amplitude, and R-squared thresholds are all met.

Why are absolute benchmark numbers behind Docker Desktop unreliable?

Measurements showed 16222 tps inside a container versus about 4400 from the host, a 3.7x penalty from the virtualized path. A/B comparisons within the same setup remain valid, but absolute numbers do not transfer to real deployments.