Xuanwo opened a new pull request, #7088:
URL: https://github.com/apache/opendal/pull/7088

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements. You can link an issue to this PR using the GitHub syntax. For 
example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   # Rationale for this change
   
   This PR is used to speed up the performance of `OperatorInputStream`:
   
   Before:
   
   ```shell
   ❯ java -jar target/benchmarks.jar 
org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark
   
   Benchmark                                       MiB/s
   org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark.createInputStream   
1468.264
   org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark.readRange  44586.656
   ```
   
   After:
   
   ```shell
   ❯ java -jar target/benchmarks.jar 
org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark
   Benchmark                                       MiB/s
   org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark.createInputStream  
22430.267
   org.apache.opendal.bench.jmh.OperatorReadJmhBenchmark.readRange  48399.451
   ```
   
   Still slower than `readRange` but much faster than before.
   
   # What changes are included in this PR?
   
   - Add a basic benchmark framework for opendal java
   - Implement `int read(byte[] b, int off, int len)` for `OperatorInputStream`
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the 
`breaking-changes` label.
   -->
   
   # AI Usage Statement
   
   <!--
   If you are using AI tools to build this PR, please include a statement 
specifying the tool and models you are using.
   -->
   
   **Parts of this PR were drafted with assistance from Codex (with `gpt-5.2`) 
and fully reviewed and edited by me. I take full responsibility for all 
changes.**
   


-- 
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]

Reply via email to