Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All stats are zero #481

Open
yurenklimbu opened this issue Mar 9, 2023 · 5 comments
Open

All stats are zero #481

yurenklimbu opened this issue Mar 9, 2023 · 5 comments

Comments

@yurenklimbu
Copy link

System
macOS Monterey
autocannon v7.10.0
node v18.13.0

 nodeapp  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: 11

56k requests in 11.02s, 0 B read
56k errors (0 timeouts)
@mcollina
Copy link
Owner

What server are you running?

@LuisMalhadas
Copy link

LuisMalhadas commented Apr 8, 2023

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!%

@fvarano
Copy link

fvarano commented Apr 11, 2023

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

@LuisMalhadas
Copy link

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)

@patrickcavli
Copy link

Confirming the issue in node v20.6.1. Glad that someone opened a thread on it.
Using autocannon 7.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants