-
Notifications
You must be signed in to change notification settings - Fork 70
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
chore: add active users counter per rate limiter duration #3150
base: main
Are you sure you want to change the base?
chore: add active users counter per rate limiter duration #3150
Conversation
🚨 Memory Leak Detected 🚨A potential memory leak has been detected in the test titled Details📊 Memory Leak Detection Report 📊 GC Type: MarkSweepCompact Heap Statistics (before vs after executing the test):
Heap Space Statistics (before vs after executing the test):
RecommendationsPlease investigate the memory allocations in this test, focusing on objects that are not being properly deallocated. |
Test Results 17 files - 4 229 suites - 48 29m 25s ⏱️ - 4m 14s Results for commit 9ae5db5. ± Comparison against base commit ca044f1. This pull request removes 2 tests.
♻️ This comment has been updated with latest results. |
c40af15
to
9c52deb
Compare
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.
LGTM
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.
Good change but not sure it's at the right level and might have side effects
this.register.removeSingleMetric(activeUsersPerLimitPeriodCounterName); | ||
this.activeUsersPerLimitPeriodCounter = new Counter({ | ||
name: activeUsersPerLimitPeriodCounterName, | ||
help: 'Relay Hbar rate limiter active users counter', |
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.
note this isn't specific to the spending plan.
This should be in general, it just happens that eth_sendRawTransaction and others might spend hBAR.
Does have it in the spending plan mean we'd miss calls that don't spend HBAR.
Maybe this should be placed higher up in the server?
* @private | ||
*/ | ||
private resetActiveUsers(): void { | ||
this.activeUsersPerLimitPeriodCounter.reset(); |
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.
I don't think we should be resetting in code.
Shouldn't we be able to group this within the metric collection tool e.g. Grafana
For instance if the duration is not 24hrs the intent breaks
9c52deb
to
540fdca
Compare
Signed-off-by: Nadezhda Popova <[email protected]>
Signed-off-by: Nadezhda Popova <[email protected]>
Signed-off-by: Nadezhda Popova <[email protected]>
Signed-off-by: Nadezhda Popova <[email protected]>
540fdca
to
9ae5db5
Compare
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3150 +/- ##
==========================================
- Coverage 83.11% 83.09% -0.03%
==========================================
Files 66 66
Lines 4312 4317 +5
Branches 843 845 +2
==========================================
+ Hits 3584 3587 +3
- Misses 485 486 +1
- Partials 243 244 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Is there a way to have this managed by the metrics service?
Description:
Add counter for active users based on the rate limiter duration period.
Related issue(s):
Fixes #3151
Notes for reviewer:
Checklist