-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
TypeError: Expected a number, got number #82
Comments
Unfortunately I'm having some trouble reproducing this, can you confirm this is happening with current master? |
Maybe this is related: #83 |
@thekemkid Tried with master, same results. @mcollina Changing From what I observed, this error only occurs with high values for |
@bzoz can you please upload a little test server that exhibits this? And also the actual options you are using for |
Here https://gist.github.com/bzoz/4bedbd51c3160875144c1dd108673eaa. This is cropped version of https://github.com/nodejs/node/blob/master/benchmark/http/end-vs-write-end.js. With |
I can't reproduce with v0.13.3. Which version are you on? I can get:
Meaning that 0 requests completed (with a buffer of |
I'm trying it with one in the master branch. It happens when autocannon tires to pretty-print
It seems it is somewhat flaky, as I am able to run autocannon successfully from time to time. |
Another thing I found: if I slow down my VM, problem goes away. Could there be overflow somewhere in throughput calculations? |
I played some more, and I think I nailed it: this happens when rate gets above 1 GB/s. |
@bzoz I can't get it to trigger the error :(.
I'm very impressed autocannon can go that fast 💨 💃 .
This is probably wrong, and maybe it's related to a duration of 1s. Can you try something longer, maybe 5-10s? Can you still reproduce? Worst-case: we just wrap it in a check if it is |
I've added
|
https://github.com/mcollina/autocannon/blob/master/lib/run.js#L37 causes this. If I add one more zero there it works. If you remove one or two you should start getting the same errors that I had. |
LOL, I thought 1000000000 was a bigger enough number. Would you like to send a PR on that? Adding zeros is perfect. |
I'll make the PR. I think two more will be enough :) |
When benchmarking this node.js script with:
autocannon -d 1 localhost:1234
Result:
This does not happen, when
-j
is used, which produces:The text was updated successfully, but these errors were encountered: