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

feature_request: make autocannon run indefinitely whilst emitting reports periodically #92

Closed
eljefedelrodeodeljefe opened this issue Oct 9, 2016 · 6 comments · Fixed by #94
Assignees

Comments

@eljefedelrodeodeljefe
Copy link

In a microservice architecture it is nice to have constant load on the systems to track p99 latencies.

This talk gives a nice real world example done by Uber. https://www.youtube.com/watch?v=kb-m2fasdDY

Hence it would be cool to have:

const instance = autocannon({
  url: 'https://url.url',
  connections: 30, 
  pipelining: 3,
  duration: 0 // for safe infinite
}, console.log)

instance.on('report', sendToAnalytics)
@mcollina
Copy link
Owner

mcollina commented Oct 9, 2016

I'm missing what the 'report' should do, compared to the callback.

Would you like to send a pr?

@eljefedelrodeodeljefe
Copy link
Author

The idea would be streaming the report to some kind of UI to have a continuous metrics. Sure, will PR or maybe get @thekemkid into the loop.

@mcollina
Copy link
Owner

mcollina commented Oct 9, 2016

There is already an event fired (the one that updates the progress bar in the CLI), isn't that enough?

@eljefedelrodeodeljefe
Copy link
Author

Sure my point is rather having autocannon running forever reliably by passing a 0 duration or similar. I believe there is nothing for it, right?

@mcollina
Copy link
Owner

mcollina commented Oct 9, 2016

At the moment no. Most of the code is written to be extremely low overhead,
and I fear it might cause either a slowdown or a decently sized rewrite.

A quick-and-dirty solution is to reschdule autocannon when it finishes.
However, this would kill the tcp sockets.

Would you be ok with emitting fresh data every 5-10 seconds?

The problem is that autocannon will generate the maximum amount of load in
that interval given the chosen number of connections. You will have to set
the overallRate to limit this.
Il giorno dom 9 ott 2016 alle 22:38 Robert Jefe Lindstädt <
[email protected]> ha scritto:

Sure my point is rather having autocannon running forever reliably by
passing a 0 duration or similar. I believe there is nothing for it, right?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#92 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADL48R380P2Ldv80m8dCevpXz0yRjElks5qyVCvgaJpZM4KSE2V
.

@eljefedelrodeodeljefe
Copy link
Author

Thanks everyone!

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

Successfully merging a pull request may close this issue.

3 participants