-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
pacer: Introduce LinearPacer #425
Conversation
This commit introduces a LinearPacer which paces an attack by starting at a given request rate and increasing linearly with the given slope. This is a pre-requisite for implementing #418
PTAL @mrnugget, @keegancsmith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases are really informative 👍
} | ||
|
||
expectedHits := p.hits(elapsed) | ||
if hits == 0 || hits < uint64(expectedHits) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to compare hits to 0? I would expect expectedHits to always be > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be zero if elapsed == 0. That shouldn't happen at runtime in the vegeta attack command, only in tests, or when called as a library with that value.
@tsenart i was about to open a question issue for ramp-up and ramp-down but then i saw this. Readme.md is not up to date with Should i expect a doc soon |
@anas-qa: I haven't had the time to implementing #418, so there's no way to use this via the CLI yet. |
Thanks @tsenart This would be a huge +1 once it is Hope soon 👍 |
Sorry I didn't get around to this, life sort-of got in the way. The code looks great, this is exactly the sort of thing you need to do destructive load-testing :-) |
This commit introduces a LinearPacer which paces an attack by starting
at a given request rate and increasing linearly with the given slope.
This is a pre-requisite for implementing #418