Comments (5)
Same here,
autocannon http://localhost:3000
Running 10s test @ http://localhost:3000
10 connections
┌─────────┬──────┬──────┬───────┬──────┬──────┬───────┬──────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼──────┼───────┼──────┤
│ Latency │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │
└─────────┴──────┴──────┴───────┴──────┴──────┴───────┴──────┘
┌───────────┬─────┬──────┬─────┬───────┬─────┬───────┬─────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────┼──────┼─────┼───────┼─────┼───────┼─────┤
│ Req/Sec │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │
├───────────┼─────┼──────┼─────┼───────┼─────┼───────┼─────┤
│ Bytes/Sec │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │
└───────────┴─────┴──────┴─────┴───────┴─────┴───────┴─────┘
Req/Bytes counts sampled once per second.
# of samples: 10
35k requests in 10.02s, 0 B read
35k errors (0 timeouts)
But curl works.
curl http://localhost:3000
<h1>Hello, World!</h1>
Server is the hello world from Axum.rs
It looks like every request is erroring, so if I run:
autocannon --debug http://localhost:3000
I get n logs of this:
Error: connect ECONNREFUSED ::1:3000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 3000
}
Which seems related to nodejs/node#40702
Looks like a breaking change from Node 17 onwards.
Edit
Specifying localhost as IPv4 works:
autocannon --debug http://127.0.0.1:3000
Running 10s test @ http://127.0.0.1:3000
10 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼────────┼───────┤
│ Latency │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0.01 ms │ 0.1 ms │ 14 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 31039 │ 31039 │ 36191 │ 36511 │ 35677.6 │ 1569.5 │ 31027 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 4.31 MB │ 4.31 MB │ 5.03 MB │ 5.07 MB │ 4.96 MB │ 219 kB │ 4.31 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 10
357k requests in 10.01s, 49.6 MB read
Specs:
Windows 10
autocannon v7.10.0
node v18.14.1
from autocannon.
I confirm! Nice catch @fvarano
% autocannon -c 100 -d 5 -p 10 http://127.0.0.1:3000
Running 5s test @ http://127.0.0.1:3000
100 connections with 10 pipelining factor
┌─────────┬───────┬────────┬────────┬────────┬───────────┬───────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼────────┼────────┼────────┼───────────┼───────────┼────────┤
│ Latency │ 40 ms │ 528 ms │ 976 ms │ 988 ms │ 510.81 ms │ 287.02 ms │ 995 ms │
└─────────┴───────┴────────┴────────┴────────┴───────────┴───────────┴────────┘
┌───────────┬─────┬──────┬─────┬────────┬─────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────┼──────┼─────┼────────┼─────────┼─────────┼────────┤
│ Req/Sec │ 0 │ 0 │ 0 │ 592 │ 118.4 │ 236.8 │ 592 │
├───────────┼─────┼──────┼─────┼────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 0 B │ 0 B │ 0 B │ 111 MB │ 22.3 MB │ 44.5 MB │ 111 MB │
└───────────┴─────┴──────┴─────┴────────┴─────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 5
0 2xx responses, 592 non 2xx responses
165k requests in 5.03s, 111 MB read
569 errors (0 timeouts)
from autocannon.
What server are you running?
from autocannon.
2nd, but I'm on a Mac M2 :
% autocannon -c 100 -d 5 -p 10 http://localhost:3000
Running 5s test @ http://localhost:3000
100 connections with 10 pipelining factor
┌─────────┬──────┬──────┬───────┬──────┬──────┬───────┬──────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼──────┼───────┼──────┤
│ Latency │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │ 0 ms │
└─────────┴──────┴──────┴───────┴──────┴──────┴───────┴──────┘
┌───────────┬─────┬──────┬─────┬───────┬─────┬───────┬─────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────┼──────┼─────┼───────┼─────┼───────┼─────┤
│ Req/Sec │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │
├───────────┼─────┼──────┼─────┼───────┼─────┼───────┼─────┤
│ Bytes/Sec │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │ 0 B │
└───────────┴─────┴──────┴─────┴───────┴─────┴───────┴─────┘
Req/Bytes counts sampled once per second.
# of samples: 5
460k requests in 5.01s, 0 B read
46k errors (0 timeouts)
% autocannon -v
autocannon v7.10.0
node v19.7.0
The server is a bun.js README example. Which seems to be working any other way:
% curl http://localhost:3000
Bun!%
from autocannon.
Confirming the issue in node v20.6.1. Glad that someone opened a thread on it.
Using autocannon 7.12.0
from autocannon.
Related Issues (20)
- Feature: adding the whole response to verifyBody callback HOT 1
- Cannot make setupRequest function async HOT 1
- [Question]: not able to generate more than ~20 RPS HOT 5
- headers format HOT 1
- Cannot specify body for `PUT` request via CLI HOT 2
- Plans to update `@types/autocannon`? HOT 1
- Result shows 0 data HOT 3
- Traefik ignores autocannon when setting Host header HOT 1
- Icon without text HOT 1
- Can't print results with printResults HOT 1
- How to use aggregateResult?
- cURL parameter compatibility HOT 5
- External script or websocket support HOT 1
- 7.15.0 not published to npm HOT 1
- Is there a way to generate a url for each request? HOT 3
- How to set 'keepalive' ? HOT 1
- Non-http usage? For CLI? HOT 1
- status code option HOT 5
- Arg parsing fails if URL ends with `]` HOT 15
- Investigate and fix failing test on windows with node 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autocannon.