kpumuk opened a new pull request, #3714: URL: https://github.com/apache/thrift/pull/3714
<!-- Explain the changes in the pull request below: --> This expands Ruby RuboCop coverage with compatible layout, lint, style, and performance cops. Existing offenses are corrected with semantics-preserving forms, including exact JRuby engine comparisons, `Regexp#match?`, `Range#cover?`, `Array.new`, explicit block checks, and `UnboundMethod#bind_call`. The change also removes the obsolete pre-Ruby-1.8.7 `Object#tap` compatibility shim and stale fastthread benchmark reporting. Apache Thrift's Ruby minimum is 2.7. ## Benchmarks A dependency-free microbenchmark compared the exact old and proposed struct dispatch operations. Each result is the median of seven trials after 100,000 warmup operations, with 1,000,000 measured operations per trial. Command and configuration: ```console ITERATIONS=1000000 WARMUP_ITERATIONS=100000 TRIALS=7 ruby struct_dispatch_benchmark.rb ``` | Ruby | Operation | Master median | Proposed median | Delta | |---|---|---:|---:|---:| | 2.7.8, aarch64-linux | Explicit struct block dispatch | 0.154338 s | 0.144482 s | -6.39% | | 2.7.8, aarch64-linux | Exception initializer dispatch | 0.277553 s | 0.206366 s | -25.65% | | 4.0.6, aarch64-linux | Explicit struct block dispatch | 0.187137 s | 0.168729 s | -9.84% | | 4.0.6, aarch64-linux | Exception initializer dispatch | 0.276757 s | 0.188756 s | -31.80% | The harness isolates `block_given?` versus an explicit block check and `bind(...).call` versus `bind_call`; it does not estimate whole-application performance. <!-- We recommend you review the checklist/tips before submitting a pull request. --> - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? ([Request account here](https://selfserve.apache.org/jira-account.html), not required for trivial changes) - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [x] Did you squash your changes to a single commit? (not required, but preferred) - [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources. <!-- The Contributing Guide at: https://github.com/apache/thrift/blob/master/CONTRIBUTING.md has more details and tips for committing properly. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
