hashgraph / hedera-json-rpc-relay

Implementation of Ethereum JSON-RPC APIs for Hedera
Apache License 2.0
68 stars 72 forks source link

chore: add active users counter per rate limiter duration #3150

Closed nadezhdapopovaa closed 1 week ago

nadezhdapopovaa commented 3 weeks ago

Description: Add counter for active users based on the rate limiter duration period.

Related issue(s):

Fixes #3151

Notes for reviewer:

Checklist

github-actions[bot] commented 3 weeks ago

🚨 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: 27,888 ms

Heap Statistics (before vs after executing the test):

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

Recommendations

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

github-actions[bot] commented 3 weeks ago

Test Results

 19 files  + 2  272 suites  +42   34m 0s :stopwatch: + 4m 59s 607 tests ± 0  601 :white_check_mark:  -β€Šβ€‡2  4 :zzz: Β±0  2 :x: +2  699 runsβ€Š +76  693 :white_check_mark: +74  4 :zzz: Β±0  2 :x: +2 

For more details on these failures, see this check.

Results for commit 127fc31d. ± Comparison against base commit 264d2cbe.

:recycle: This comment has been updated with latest results.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (264d2cb) to head (127fc31). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/relay/src/lib/eth.ts 70.00% 0 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3150 +/- ## ========================================== - Coverage 77.85% 77.83% -0.03% ========================================== Files 66 66 Lines 4453 4457 +4 Branches 993 998 +5 ========================================== + Hits 3467 3469 +2 Misses 613 613 - Partials 373 375 +2 ``` | [Flag](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Ξ” | | |---|---|---| | [config-service](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `98.14% <ΓΈ> (ΓΈ)` | | | [relay](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `78.56% <70.00%> (-0.04%)` | :arrow_down: | | [server](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `83.28% <ΓΈ> (ΓΈ)` | | | [ws-server](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `36.66% <ΓΈ> (ΓΈ)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Ξ” | | |---|---|---| | [packages/relay/src/lib/eth.ts](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3150?src=pr&el=tree&filepath=packages%2Frelay%2Fsrc%2Flib%2Feth.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-cGFja2FnZXMvcmVsYXkvc3JjL2xpYi9ldGgudHM=) | `71.04% <70.00%> (-0.10%)` | :arrow_down: |