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

pacer: Introduce LinearPacer #425

Merged
merged 2 commits into from
Jul 25, 2019
Merged

pacer: Introduce LinearPacer #425

merged 2 commits into from
Jul 25, 2019

Conversation

tsenart
Copy link
Owner

@tsenart tsenart commented Jul 23, 2019

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

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
@tsenart tsenart requested a review from keegancsmith July 23, 2019 06:13
@tsenart tsenart requested a review from xla as a code owner July 23, 2019 06:13
@tsenart
Copy link
Owner Author

tsenart commented Jul 23, 2019

PTAL @mrnugget, @keegancsmith

lib/pacer.go Outdated Show resolved Hide resolved
@tsenart
Copy link
Owner Author

tsenart commented Jul 23, 2019

cc @fluffle @LasTshaMAN

Copy link

@keegancsmith keegancsmith left a 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) {

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

Copy link
Owner Author

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 tsenart merged commit b5f4fca into master Jul 25, 2019
@tsenart tsenart deleted the linear-pacer branch July 25, 2019 00:13
@fityanos
Copy link

@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 pacer

Should i expect a doc soon

@tsenart
Copy link
Owner Author

tsenart commented Aug 30, 2019

@anas-qa: I haven't had the time to implementing #418, so there's no way to use this via the CLI yet.

@fityanos
Copy link

Thanks @tsenart

This would be a huge +1 once it is

Hope soon 👍

@fluffle
Copy link
Contributor

fluffle commented Sep 24, 2019

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 :-)

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 this pull request may close these issues.

4 participants