Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Update RateLimiter to scale credits on update #264

Merged
merged 8 commits into from Jun 25, 2018

Conversation

black-adder
Copy link
Contributor

The current update function truncates the balance on update instead of scaling it proportionally with respect to the old range and the new range. By scaling, we maintain the randomness in the balances across clients.

Signed-off-by: Won Jun Jang wjang@uber.com

Signed-off-by: Won Jun Jang <wjang@uber.com>
@ghost ghost assigned black-adder Jun 5, 2018
@ghost ghost added the review label Jun 5, 2018
@coveralls
Copy link

coveralls commented Jun 6, 2018

Coverage Status

Coverage decreased (-0.002%) to 96.909% when pulling 4853f3f on rate_limiter_proportional into 41189fa on master.

black-adder and others added 7 commits June 6, 2018 11:04
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
@black-adder black-adder merged commit 0042b1c into master Jun 25, 2018
@ghost ghost removed the review label Jun 25, 2018
@black-adder black-adder deleted the rate_limiter_proportional branch June 25, 2018 19:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants