An HTTP/1.1 benchmarking tool for Node.js, designed to be fast and easy to use. Current stable version is 8.0.0, released in late 2021. It supports HTTP pipelining, HTTPS, and can produce more load than wrk or wrk2. It offers both a command-line interface and a programmatic API, with features like warm-up, worker threads, HAR file replay, and custom request bodies. The project is actively maintained by the Node.js community.
npm install autocannonVerified import paths — ran on the pinned version, not inferred.
Runs a 10-second benchmark with 10 concurrent connections against a local server and prints progress to console.
Update imports to use ESM syntax; do not use require().
Replace autocannon.printResult(output, result) with autocannon.print(output, result).
Use autocannon.track() or listen for 'done' event on the instance.
Use only one of 'amount' or 'duration' at a time.
Ensure the 'requests' array contains objects with 'method', 'path', 'headers', 'body' as needed.
Replace require('autocannon') with import autocannon from 'autocannon' or use dynamic import().Use import autocannon from 'autocannon' (default import).
Ensure the server is running on the specified port; check URL and port.