Add occupy mechanism for future buckets of sliding window to support "prioritized requests" - #568
Merged
Conversation
- Update test cases - Also add `totalPass` method in Node interface Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Also fix for test cases Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #568 +/- ##
============================================
- Coverage 38.73% 38.63% -0.11%
- Complexity 1186 1213 +27
============================================
Files 271 275 +4
Lines 8488 8674 +186
Branches 1133 1159 +26
============================================
+ Hits 3288 3351 +63
- Misses 4785 4906 +121
- Partials 415 417 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #568 +/- ##
============================================
+ Coverage 39.09% 39.12% +0.03%
- Complexity 1196 1225 +29
============================================
Files 271 275 +4
Lines 8494 8674 +180
Branches 1134 1159 +25
============================================
+ Hits 3321 3394 +73
- Misses 4754 4853 +99
- Partials 419 427 +8
Continue to review full report at Codecov.
|
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
Add occupy mechanism for future buckets of sliding window to support "prioritized requests".
Does this pull request fix one issue?
Related to #207
Describe how you did it
MetricsLeapArray->BucketLeapArrayFutureBucketLeapArray, a kind ofBucketLeapArraythat only reserves for future buckets, which is used for calculating occupied future tokens.OccupiableBucketLeapArraythat combines commonBucketLeapArraywithFutureBucketLeapArray. TherollingNumberInSecondinStatisticNodenow usesOccupiableBucketLeapArrayby default.OccupySupportinterface.Nodenow implementsOccupySupportinterface.MetricandArrayMetric.Describe how to verify it
Run the test case and demo.
Special notes for reviews
This PR contains breaking changes, please consider it carefully.