Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging to release-5.2: [TT-13819] Benchmark updates, session limiter…
… workaround for test goroutine leak (#6826) (#6834) ### **User description** [TT-13819] Benchmark updates, session limiter workaround for test goroutine leak (#6826) ### **PR Type** Enhancement, Tests ___ ### **Description** - Added `DisableRateLimit` and `DisableQuota` flags in multiple test cases. - Improved benchmark scripts and added skipping for specific benchmarks. - Refactored session limiter to encourage reuse of `bucketStore`. - Updated CI benchmark script for better profiling and output. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><details><summary>7 files</summary><table> <tr> <td><strong>api_definition_test.go</strong><dd><code>Added <code>DisableRateLimit</code> and <code>DisableQuota</code> flags in API definition tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-2394daab6fdc5f8dc234699c80c0548947ee3d68d2e33858258d73a8b5eb6f44">+2/-0</a> </td> </tr> <tr> <td><strong>event_system_test.go</strong><dd><code>Added benchmark skipping for generic event handlers</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-59fda3ebcb87e3c16f222e51988dfb18be9239c84caeef0137db04ffe9ab8f3c">+2/-0</a> </td> </tr> <tr> <td><strong>mw_basic_auth_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in basic auth tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-148b4d4c5c77fa4382e83fd583c36d21bba7b52217f821095abbc517d277b16f">+2/-1</a> </td> </tr> <tr> <td><strong>mw_jwt_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in JWT tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-406bf8fdb6c0cc77f04c6245c70abfc592ddb1525aa843200d850e14d135ebfc">+10/-0</a> </td> </tr> <tr> <td><strong>mw_transform_test.go</strong><dd><code>Refactored transform middleware benchmarks for better structure</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-ec6f80b3dcb001b2a2ac9b7277fff606bd77d796f99b8c1d10b8d0d55863deb3">+9/-7</a> </td> </tr> <tr> <td><strong>oauth_manager_test.go</strong><dd><code>Added benchmark skipping for OAuth token purging</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-139c3beb238f234728bde9f619f501cf730a7e275d17c8511277272d1dcd6fc6">+2/-0</a> </td> </tr> <tr> <td><strong>res_handler_header_injector_test.go</strong><dd><code>Adjusted header injection benchmarks and test cases</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-1c82da1ac85593e31ce947ef821703967ceb8065a5434c6749b802a1b93f9117">+7/-6</a> </td> </tr> </table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>session_manager.go</strong><dd><code>Refactored session limiter to reuse `bucketStore`</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-e6b40a285464cd86736e970c4c0b320b44c75b18b363d38c200e9a9d36cdabb6">+4/-1</a> </td> </tr> <tr> <td><strong>ci-benchmark.sh</strong><dd><code>Enhanced CI benchmark script with profiling and output improvements</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-e789974499a5ba77194df612e751bc3db20b73c389466c679e4e74521199dd48">+9/-3</a> </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>CODEOWNERS</strong><dd><code>Updated ownership for `/bin/` directory</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6826/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7">+1/-0</a> </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --------- Co-authored-by: Tit Petric <[email protected]> [TT-13819]: https://tyktech.atlassian.net/browse/TT-13819?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ ___ ### **PR Type** Enhancement, Tests ___ ### **Description** - Introduced `DisableRateLimit` and `DisableQuota` flags across multiple test cases. - Enhanced benchmark scripts with skipping and profiling improvements. - Refactored session limiter to reuse `bucketStore` for efficiency. - Updated CI benchmark script for structured profiling and output. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><details><summary>8 files</summary><table> <tr> <td><strong>api_definition_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in API tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-2394daab6fdc5f8dc234699c80c0548947ee3d68d2e33858258d73a8b5eb6f44">+2/-0</a> </td> </tr> <tr> <td><strong>event_system_test.go</strong><dd><code>Added benchmark skipping for generic event handlers</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-59fda3ebcb87e3c16f222e51988dfb18be9239c84caeef0137db04ffe9ab8f3c">+2/-0</a> </td> </tr> <tr> <td><strong>mw_basic_auth_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in basic auth tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-148b4d4c5c77fa4382e83fd583c36d21bba7b52217f821095abbc517d277b16f">+2/-1</a> </td> </tr> <tr> <td><strong>mw_jwt_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in JWT tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-406bf8fdb6c0cc77f04c6245c70abfc592ddb1525aa843200d850e14d135ebfc">+10/-0</a> </td> </tr> <tr> <td><strong>mw_transform_test.go</strong><dd><code>Refactored transform middleware benchmarks for better structure</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-ec6f80b3dcb001b2a2ac9b7277fff606bd77d796f99b8c1d10b8d0d55863deb3">+58/-1</a> </td> </tr> <tr> <td><strong>mw_version_check_test.go</strong><dd><code>Added `DisableRateLimit` and `DisableQuota` flags in versioning tests</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-ed8d515ea6f4f1a67801c8eb3ac5f195d36dac57a2dff6da736886f8772941ae">+2/-0</a> </td> </tr> <tr> <td><strong>oauth_manager_test.go</strong><dd><code>Added benchmark skipping and new tests for OAuth token purging</code></dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-139c3beb238f234728bde9f619f501cf730a7e275d17c8511277272d1dcd6fc6">+91/-0</a> </td> </tr> <tr> <td><strong>res_handler_header_injector_test.go</strong><dd><code>Adjusted header injection benchmarks and test cases</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-1c82da1ac85593e31ce947ef821703967ceb8065a5434c6749b802a1b93f9117">+7/-6</a> </td> </tr> </table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>session_manager.go</strong><dd><code>Refactored session limiter to reuse `bucketStore`</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-e6b40a285464cd86736e970c4c0b320b44c75b18b363d38c200e9a9d36cdabb6">+22/-0</a> </td> </tr> <tr> <td><strong>ci-benchmark.sh</strong><dd><code>Enhanced CI benchmark script with profiling improvements</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-e789974499a5ba77194df612e751bc3db20b73c389466c679e4e74521199dd48">+13/-3</a> </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>CODEOWNERS</strong><dd><code>Updated ownership for `/bin/` directory and workflows</code> </dd></td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6834/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7">+15/-0</a> </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --------- Co-authored-by: Tit Petric <[email protected]> Co-authored-by: Tit Petric <[email protected]>
- Loading branch information