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

fix: bugged metrics and wrong env vars #3090

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Conversation

victor-yanev
Copy link
Contributor

@victor-yanev victor-yanev commented Oct 11, 2024

Description:

  • Removes the "daily" keyword from everywhere since it's no longer valid
  • Resets the metrics for unique spending plans used together with the reset of the HBAR limiter (because when the limiter is restarted all BASIC plans will expire and on next requests from the same ETH addresses they will be considered as new unique BASIC plans and this metric won't make sense anymore unless we reset the metric together with the limiter)
  • Fixes wrong env vars in constants.ts

Related issues:

Fixes #3092

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev added bug Something isn't working P1 labels Oct 11, 2024
@victor-yanev victor-yanev added this to the 0.58.0 milestone Oct 11, 2024
@victor-yanev victor-yanev self-assigned this Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

🚨 Memory Leak Detected 🚨

A potential memory leak has been detected in the test titled validates enforcement of request id. This may impact the application's performance and stability.

Details

📊 Memory Leak Detection Report 📊

GC Type: MarkSweepCompact
Cost: 29,356.6 ms

Heap Statistics (before vs after executing the test):

  • Total Heap Size: increased with 1.46 MB
  • Total Heap Size Executable: no changes
  • Total Physical Size: decreased with 348.16 KB
  • Total Available Size: decreased with 5.37 MB
  • Total Global Handles Size: no changes
  • Used Global Handles Size: decreased with 64.00 bytes
  • Used Heap Size: decreased with 3.44 MB
  • Heap Size Limit: no changes
  • Malloced Memory: no changes
  • External Memory: no changes
  • Peak Malloced Memory: no changes

Heap Space Statistics (before vs after executing the test):

  • Old Space:

    • Space Size: increased with 1.84 MB
    • Space Used Size: increased with 2.08 MB
    • Space Available Size: decreased with 8.73 MB
    • Physical Space Size: increased with 1.84 MB
  • Large Object Space:

    • Space Size: increased with 835.58 KB
    • Space Used Size: increased with 813.50 KB
    • Space Available Size: no changes
    • Physical Space Size: increased with 835.58 KB

Recommendations

Please investigate the memory allocations in this test, focusing on objects that are not being properly deallocated.

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Copy link

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

Tests

       3 files     398 suites   18s ⏱️
1 428 tests 1 427 ✔️ 1 💤 0
1 437 runs  1 436 ✔️ 1 💤 0

Results for commit 0da22ff.

Copy link

Acceptance Tests

  20 files  276 suites   33m 57s ⏱️
600 tests 592 ✔️ 4 💤 4
704 runs  694 ✔️ 4 💤 6

Results for commit 0da22ff.

Copy link
Contributor

@ebadiere ebadiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.

@victor-yanev victor-yanev merged commit 1c8579b into main Oct 11, 2024
44 of 45 checks passed
@victor-yanev victor-yanev deleted the fix-bugged-metrics branch October 11, 2024 17:14
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.16%. Comparing base (1f776e6) to head (0da22ff).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3090   +/-   ##
=======================================
  Coverage   83.15%   83.16%           
=======================================
  Files          63       63           
  Lines        4232     4234    +2     
  Branches      830      830           
=======================================
+ Hits         3519     3521    +2     
  Misses        470      470           
  Partials      243      243           
Flag Coverage Δ
relay 85.59% <100.00%> (+<0.01%) ⬆️
server 83.43% <ø> (ø)
ws-server 33.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/constants.ts 92.00% <100.00%> (ø)
...s/relay/src/lib/services/hbarLimitService/index.ts 97.47% <100.00%> (+0.04%) ⬆️

victor-yanev added a commit that referenced this pull request Oct 11, 2024
…3093)

* feat: eth_call revert error message is too long, and should not be a REVERT but a BAD Request Response (#3088)

* chore: add validation for even calldata length

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* chore: add test coverage

Signed-off-by: nikolay <n.atanasow94@gmail.com>

---------

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* fix: bugged metrics and wrong env vars (#3090)

* fix: bugged metrics and wrong env vars

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: jsdocs

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Co-authored-by: Nikolay Atanasow <n.atanasow94@gmail.com>
konstantinabl pushed a commit that referenced this pull request Oct 15, 2024
* fix: bugged metrics and wrong env vars

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: jsdocs

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HBAR Rate Limit Redesign] Reset metrics which are dependent on the limit duration
3 participants