hashgraph / hedera-mirror-node

Hedera Mirror Node archives data from consensus nodes and serves it via an API
Apache License 2.0
128 stars 108 forks source link

Optimize `/contracts/results` and `/contracts/results/logs` in v2 #9342

Closed xin-hedera closed 2 weeks ago

xin-hedera commented 2 weeks ago

Description:

This PR optimizes the performance for /contracts/results and /contracts/results/logs in v2

Related issue(s):

Fixes #9244

Notes for reviewer:

Scenario URL VUS Pass% RPS Pass RPS Avg. Req Duration Skipped? Comment
contractsResults /contracts/results?limit=100 1500 99.98 168.88/s 168.85/s 8771.85ms No
contractsResultsLogs /contracts/results/logs?limit=100 1500 100.00 635.07/s 635.07/s 2338.73ms No

97/s and 269/s respectively for 0.113.0-rc2

Checklist

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 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 SonarCloud

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.52%. Comparing base (6dfa02b) to head (9c6b3cd). Report is 7 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9342 +/- ## ============================================ - Coverage 93.43% 92.52% -0.92% - Complexity 988 7012 +6024 ============================================ Files 344 904 +560 Lines 11011 29663 +18652 Branches 1610 3749 +2139 ============================================ + Hits 10288 27445 +17157 - Misses 590 1447 +857 - Partials 133 771 +638 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.