question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem running 2 autocannons in parallel when using setupClient()

See original GitHub issue

I have 2 files each running autocannon inside a promise. Each file calls a different api end-point.

When I call the autocannon() method to create an instance I set the initial values of the header and body, and then change the values in an instance.on('response', handleResponse) method.

Both files can run in parallel and everything works fine.

However, when I try to set the initial client header and body in the setClient method in file1, the body of file1 is suddenly being sent to the end-point of file2.

Can autocannon be run in parallel? Are the instances distinct or is there shared code between the instances?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mcollinacommented, Apr 18, 2019

This sounds like a bug. Would you like to send a PR?

0reactions
mcollinacommented, Jun 18, 2019

Fixed in #206.

Read more comments on GitHub >

github_iconTop Results From Across the Web

autocannon/README.md - UNPKG
48, The number of seconds to run the autocannon. default: 10. ... issue when requests should be sent at a fixed rate using...
Read more >
autocannon - Bountysource
Hello, I am trying to use the input (-i) option and passing the relative path to a text file. The content of the...
Read more >
autocannon-cig - npm Package Health Analysis - Snyk
A HTTP/1.1 benchmarking tool written in node, greatly inspired by wrk and wrk2, with support for HTTP pipelining and HTTPS. On my box,...
Read more >
Load testing with Autocannon - NearForm
New access to Node.js worker threads makes Autocannon an even ... We changed this in the second example, running Autocannon with three ...
Read more >
Auto Cannons too weak? :: BATTLETECH General Discussions
I agree with the AC/2, but the AC/10 is just a trade off weapon ... you should be in a problem at that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found