ARK-Builders / ark-core

The core of the ARK framework
MIT License
4 stars 3 forks source link

JNI bindings for FileStorage #61

Closed twitu closed 3 months ago

twitu commented 4 months ago

Add JNI bindings for FileStorage to create an instance and for all BaseStorage functions.

Once a FileStorage instance is created, it is boxed and leaked as jlong. This jlong can then be upcasted back to a FileStorage instance. All BaseStorage functions take the jlong as an argument upcast it and then perform the necessary operations.

Note: FileStorage needs to be specialized to use with JNI. After discussion, I've specialized it to FileStorage<String, String>, however it can be easily changed.

TODO:

twitu commented 4 months ago

The function Java_FileStorage_read_fs implements the conversion from BTreeMap to LinkedHashMap. Going from non-trivial Rust container types to Java container types requires a lot of conversion logic. It will be good to benchmark and decide if it's worth the complexity.

github-actions[bot] commented 4 months ago

Benchmark for a123167

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | ../test-assets/lena.jpg/compute_bytes | 13.3±0.12µs | 13.3±0.06µs | 0.00% | | ../test-assets/test.pdf/compute_bytes | 110.3±2.05µs | **108.5±0.76µs** | **-1.63%** | | compute_bytes_large/compute_bytes | **137.0±1.57µs** | 141.2±1.14µs | **+3.07%** | | compute_bytes_medium/compute_bytes | 27.8±0.31µs | 27.6±0.56µs | -0.72% | | compute_bytes_small/compute_bytes | 129.0±8.07ns | 128.4±4.03ns | -0.47% | | index_build/index_build/../test-assets/ | 164.8±2.77µs | 164.5±2.45µs | -0.18% |
kirillt commented 4 months ago

@twitu thanks, looks like a good start!

Note: FileStorage needs to be specialized to use with JNI. After discussion, I've specialized it to FileStorage<String, String>, however it can be easily changed.

Type String for both keys and values sounds good. Probably we'll change it to bytes later, but after benchmarking.

Store the jlong in the class instance itself rather than returning it. It will reduce the amount of Java/Kotlin wrapper code that needs to be written

I think we shouldn't mix JNI code into pure Rust structures. Desktop developers should not be affected by JNI. Building and importing fs-storage alone should not trigger building or importing JNI code. Actually, we need to move all JNI stuff into separate crate fs-storage-jni, or even directly to ark-android.

Handle Results better - Should they return a default value or should they thrown an exception? open to discussion

Is there a way to reconstruct Result/Option type? Or would it be too inefficient?

Support read_fs?

Yes, but converting whole structures really sounds inefficient.. Is it too wild to create JNI bindings for BTreeMap itself? Do we have same problem with Rust HashMap? I guess we'd need to iterate anyway but probably there are some ready-made crates for binding maps. If we can bind HashMap probably we can fork the code and implement same for BTreeMap.

twitu commented 4 months ago

The JNI bindings can be put behind a feature flag and they will only be compiled when the feature flag is set on. Separating the bindings from the logic may not be very helpful it is closely tied to the logic.

There's no good way to wrap a generic Result type in a way that's accessible to Java. Option is doable but then it will lose out on a lot of useful information. I guess in this case the best approach is to return Java Exceptions and the let the library user figure out how to handle it and it some rare cases return a default value where it makes sense.

I looked in implementation for wrapping container types, especially using jnix. It converts container types to Java in a way that's very similar to the one we've implemented for LinkedHashMap basically initializing the java object and inserting values into it. Very bad from an efficiency standpoint.

A more efficient way will be to keep the BTreeMap on the Rust side and define a specific set of operations on it through the jni bindings. I guess the most basic operation will be to get the value for a key. Perhaps a method to iterate over all the values. Do you think any other operations will be useful to library users?

github-actions[bot] commented 4 months ago

Benchmark for 744c333

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | ../test-assets/lena.jpg/compute_bytes | 13.9±0.15µs | 14.0±0.19µs | +0.72% | | ../test-assets/test.pdf/compute_bytes | **116.2±2.12µs** | 130.4±1.06µs | **+12.22%** | | compute_bytes_large/compute_bytes | **151.4±1.97µs** | 177.7±2.29µs | **+17.37%** | | compute_bytes_medium/compute_bytes | 27.9±0.50µs | **27.4±0.29µs** | **-1.79%** | | compute_bytes_small/compute_bytes | 131.2±1.38ns | 131.4±3.19ns | +0.15% | | index_build/index_build/../test-assets/ | **158.8±0.54µs** | 160.5±0.66µs | **+1.07%** |
github-actions[bot] commented 4 months ago

Benchmark for 8396b25

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | ../test-assets/lena.jpg/compute_bytes | 13.9±0.09µs | 13.9±0.12µs | 0.00% | | ../test-assets/test.pdf/compute_bytes | 171.2±0.80µs | **114.2±0.55µs** | **-33.29%** | | compute_bytes_large/compute_bytes | **141.7±1.48µs** | 144.1±1.48µs | **+1.69%** | | compute_bytes_medium/compute_bytes | 27.8±0.17µs | **27.2±0.28µs** | **-2.16%** | | compute_bytes_small/compute_bytes | 131.4±2.43ns | 131.2±1.66ns | -0.15% | | index_build/index_build/../test-assets/ | 159.0±4.48µs | 158.3±0.95µs | -0.44% |
kirillt commented 4 months ago

@twitu putting JNI bindings behind a feature flag is good-enough solution for this moment. But I think, we'll probably separate it in the future, when it's debugged. Especially, when we'll work on Swift bindings. On other hand, I can imagine having both binding flavours in the same place, together with Rust code, if it'll appear to be ergonomic enough.

There's no good way to wrap a generic Result type in a way that's accessible to Java. Option is doable but then it will lose out on a lot of useful information. I guess in this case the best approach is to return Java Exceptions and the let the library user figure out how to handle it and it some rare cases return a default value where it makes sense.

Can't we convert Rust Result into Kotlin Result?

A more efficient way will be to keep the BTreeMap on the Rust side and define a specific set of operations on it through the jni bindings. I guess the most basic operation will be to get the value for a key. Perhaps a method to iterate over all the values. Do you think any other operations will be useful to library users?

I like this approach. Not sure what exactly operations we'd need right now. We could make it a separate repo later, containing useful structures and more-or-less complete API. For now, the methods necessary to demonstrate storages are enough.

Store the jlong in the class instance itself rather than returning it. It will reduce the amount of Java/Kotlin wrapper code that needs to be written

Do you want to do it in this PR or in a follow-up?

github-actions[bot] commented 4 months ago

Benchmark for f21bb89

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.9±0.82µs** | 251.2±1.50µs | **+0.92%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.06µs | 15.6±0.15µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1347.4±1.50ns | 1347.9±9.98ns | +0.04% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.7±0.40µs** | 196.6±2.62µs | **+0.46%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1728.7±6.44µs | 1725.8±12.55µs | -0.17% | | crc32_resource_id_creation/compute_from_bytes:large | **86.6±0.19µs** | 86.8±0.50µs | **+0.23%** | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.04µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.21ns | 92.5±0.62ns | +0.22% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.34µs | 64.5±0.31µs | +0.16% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 930.5±14.54µs | **924.7±3.49µs** | **-0.62%** | | index_build/index_build/../test-assets/ | 1072.2±14.26µs | 1066.7±6.05µs | -0.51% |
github-actions[bot] commented 4 months ago

Benchmark for 437cc53

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 249.3±0.96µs | 248.7±1.39µs | -0.24% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.06µs | 15.6±0.06µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1345.3±9.36ns** | 1387.7±19.84ns | **+3.15%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.9±0.56µs | **195.1±0.79µs** | **-0.41%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1726.0±9.55µs | 1730.0±16.34µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:large | 87.0±0.94µs | 86.9±0.57µs | -0.11% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.04µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.33ns | 92.4±0.68ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.6±0.19µs | 64.6±0.29µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **922.2±4.56µs** | 927.2±5.17µs | **+0.54%** | | index_build/index_build/../test-assets/ | 1072.7±36.26µs | 1064.2±23.18µs | -0.79% |
github-actions[bot] commented 4 months ago

Benchmark for a0f6bdf

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 255.2±3.33µs | **251.0±1.29µs** | **-1.65%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.7±0.18µs | 15.7±0.55µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1350.6±1.87ns | 1351.9±15.36ns | +0.10% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.8±2.07µs | 196.1±0.67µs | +0.15% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1722.6±17.26µs | 1726.6±33.73µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.93µs | 86.8±1.41µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.15µs | 5.4±0.14µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.7±1.80ns | 92.4±0.59ns | -0.32% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±2.59µs | 64.7±1.41µs | -0.15% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 923.6±2.28µs | 923.2±4.82µs | -0.04% | | index_build/index_build/../test-assets/ | 1073.0±37.34µs | 1075.8±23.74µs | +0.26% |
github-actions[bot] commented 4 months ago

Benchmark for 95b2160

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 250.7±1.06µs | **249.4±1.09µs** | **-0.52%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.06µs | 15.6±0.04µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1351.9±5.86ns | **1350.0±1.51ns** | **-0.14%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 197.2±0.60µs | **195.7±1.04µs** | **-0.76%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1723.7±3.11µs** | 1728.3±22.39µs | **+0.27%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±0.41µs | 87.0±0.52µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.04µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.6±2.08ns | 92.3±0.39ns | -0.32% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±0.50µs | 64.8±0.33µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 927.9±2.90µs | 930.5±7.81µs | +0.28% | | index_build/index_build/../test-assets/ | 1068.9±6.42µs | 1068.1±5.00µs | -0.07% |
github-actions[bot] commented 4 months ago

Benchmark for ad27900

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 252.0±0.58µs | **250.8±8.81µs** | **-0.48%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.6±0.07µs** | 15.7±0.07µs | **+0.64%** | | blake3_resource_id_creation/compute_from_bytes:small | 1351.1±4.62ns | 1350.7±1.79ns | -0.03% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.9±0.52µs | 195.7±1.08µs | -0.10% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1728.7±8.42µs | 1724.1±15.18µs | -0.27% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.23µs | 87.0±2.78µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.10µs | 5.4±0.07µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.21ns | 92.4±0.53ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.5±0.60µs | 64.4±0.22µs | -0.16% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 929.0±9.57µs | 926.4±8.99µs | -0.28% | | index_build/index_build/../test-assets/ | 1073.4±56.19µs | 1067.4±10.07µs | -0.56% |
github-actions[bot] commented 4 months ago

Benchmark for 7d98c27

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 249.1±0.75µs | 248.5±1.52µs | -0.24% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.03µs | 15.6±0.08µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1388.4±6.03ns | 1387.9±2.54ns | -0.04% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.7±1.81µs | 196.7±2.44µs | +0.51% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1720.0±5.61µs** | 1739.4±33.58µs | **+1.13%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±1.49µs | 86.9±1.45µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.39ns | 92.5±1.10ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.36µs | 64.4±0.52µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 924.2±5.87µs | 926.2±13.52µs | +0.22% | | index_build/index_build/../test-assets/ | 1069.1±17.10µs | 1067.9±4.10µs | -0.11% |
github-actions[bot] commented 4 months ago

Benchmark for 2fccdfa

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.2±0.58µs** | 249.4±1.18µs | **+0.48%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.07µs | 15.6±0.07µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1348.4±3.02ns | **1335.6±10.81ns** | **-0.95%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.1±0.54µs | 195.6±0.51µs | +0.26% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1709.2±4.56µs** | 1716.2±9.47µs | **+0.41%** | | crc32_resource_id_creation/compute_from_bytes:large | **86.9±0.29µs** | 87.4±2.66µs | **+0.58%** | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.07µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.36ns | 92.5±0.81ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±0.41µs | 64.8±0.47µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **931.9±2.37µs** | 935.1±4.74µs | **+0.34%** | | index_build/index_build/../test-assets/ | 1063.7±16.87µs | 1059.9±12.15µs | -0.36% |
github-actions[bot] commented 4 months ago

Benchmark for 792a49f

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **249.4±0.51µs** | 252.2±0.46µs | **+1.12%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.02µs** | 15.6±0.06µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1342.8±9.64ns | 1343.2±2.29ns | +0.03% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.3±0.87µs | 195.3±0.77µs | 0.00% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1710.3±5.65µs | 1715.9±38.18µs | +0.33% | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±0.39µs | 87.1±0.69µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.46ns | 92.4±0.34ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.50µs | 64.5±1.15µs | +0.16% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 934.1±4.18µs | 932.6±5.89µs | -0.16% | | index_build/index_build/../test-assets/ | **1057.6±5.70µs** | 1062.6±4.06µs | **+0.47%** |
github-actions[bot] commented 4 months ago

Benchmark for 5e2dc89

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **249.2±0.60µs** | 249.9±1.89µs | **+0.28%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.08µs | **15.5±0.11µs** | **-0.64%** | | blake3_resource_id_creation/compute_from_bytes:small | 1345.6±2.13ns | 1344.6±7.95ns | -0.07% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.2±0.50µs** | 195.9±0.52µs | **+0.36%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1725.5±3.35µs | **1714.3±14.92µs** | **-0.65%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.38µs | 86.7±0.25µs | -0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.09µs | 5.4±0.05µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.47ns | 92.4±0.45ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.3±0.35µs | 64.5±0.35µs | +0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 930.4±4.87µs | 931.1±4.28µs | +0.08% | | index_build/index_build/../test-assets/ | 1059.1±4.81µs | 1058.0±8.23µs | -0.10% |
github-actions[bot] commented 4 months ago

Benchmark for cc2e79b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **247.4±0.57µs** | 248.3±0.95µs | **+0.36%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.03µs | **15.5±0.11µs** | **-0.64%** | | blake3_resource_id_creation/compute_from_bytes:small | 1357.3±2.01ns | **1333.6±10.45ns** | **-1.75%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.2±0.58µs | 195.2±0.47µs | 0.00% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1706.1±6.42µs** | 1716.6±32.25µs | **+0.62%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.32µs | 86.8±0.60µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | **5.4±0.02µs** | 5.5±0.35µs | **+1.85%** | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.18ns | 92.4±0.43ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.72µs | 64.6±0.66µs | +0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.8±3.54µs | 932.2±3.99µs | +0.04% | | index_build/index_build/../test-assets/ | 1058.7±4.23µs | 1059.3±10.60µs | +0.06% |
github-actions[bot] commented 4 months ago

Benchmark for 8ceb461

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **251.4±0.46µs** | 253.2±14.03µs | **+0.72%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.12µs | **15.5±0.04µs** | **-0.64%** | | blake3_resource_id_creation/compute_from_bytes:small | **1343.5±1.66ns** | 1348.8±1.38ns | **+0.39%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.0±0.62µs | 195.1±0.73µs | +0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1711.7±6.45µs | 1714.5±18.05µs | +0.16% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.42µs | 86.8±0.25µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.31µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.44ns | 92.4±0.42ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±0.35µs | **64.5±0.28µs** | **-0.46%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 929.0±3.96µs | 928.7±5.01µs | -0.03% | | index_build/index_build/../test-assets/ | 1058.0±18.98µs | 1061.8±6.51µs | +0.36% |
Pushkarm029 commented 4 months ago

CI is failing due to Java warnings. It is running perfectly locally.

tareknaser commented 4 months ago

The logs from the failing CI show that there is probably an error not just warnings

cd tests && \
if [ ! -f "junit.jar" ]; then \
    curl -o "junit.jar" "https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.3/junit-platform-console-standalone-1.9.3.jar"; \
else \
    echo "junit.jar already exists."; \
fi
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2552k  100 2552k    0     0  9533k      0 --:--:-- --:--:-- --:--:-- 9525k
(cd ../target/debug && \
export LD_LIBRARY_PATH=$PWD && \
cd ../../fs-storage/tests && \
javac -Xlint:none -d out FileStorage.java && \
javac -Xlint:none -d out -cp out:junit.jar FileStorageTest.java && \
java -jar junit.jar --class-path out --scan-class-path)
Note: FileStorageTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jni-0.21.1/src/wrapper/jnienv.rs:520:9:
NullDeref("*JNIEnv")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
make: *** [Makefile:24: java-test] Error 134
Pushkarm029 commented 4 months ago

locally i am getting this : (im on debian)

pushkarm029@thinkpad:~/ark-rust(jni-bindings○) » cd fs-storage
pushkarm029@thinkpad:~/ark-rust/fs-storage(jni-bindings○) » make test
cargo build --release --features jni-bindings
    Finished `release` profile [optimized] target(s) in 0.24s
cd tests && \
if [ ! -f "junit.jar" ]; then \
    curl -o "junit.jar" "https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.3/junit-platform-console-standalone-1.9.3.jar"; \
else \
    echo "junit.jar already exists."; \
fi
junit.jar already exists.
(cd ../target/debug && \
export LD_LIBRARY_PATH=$PWD && \
cd ../../fs-storage/tests && \
javac -Xlint:none -d out FileStorage.java && \
javac -Xlint:none -d out -cp out:junit.jar FileStorageTest.java && \
java -jar junit.jar --class-path out --scan-class-path)
Note: FileStorageTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Thanks for using JUnit! Support its development at https://junit.org/sponsoring

╷
├─ JUnit Jupiter ✔
│  └─ FileStorageTest ✔
│     ├─ testFileStorageNeedsSyncing() ✔
│     ├─ testFileStorageMonoidCombine() ✔
│     ├─ testFileStorageAutoDelete() ✔
│     ├─ testFileStorageMainScenario() ✔
│     └─ testFileStorageWriteRead() ✔
├─ JUnit Vintage ✔
└─ JUnit Platform Suite ✔

Test run finished after 186 ms
[         4 containers found      ]
[         0 containers skipped    ]
[         4 containers started    ]
[         0 containers aborted    ]
[         4 containers successful ]
[         0 containers failed     ]
[         5 tests found           ]
[         0 tests skipped         ]
[         5 tests started         ]
[         0 tests aborted         ]
[         5 tests successful      ]
[         0 tests failed          ]
Pushkarm029 commented 4 months ago

Yup, there might be some internal issue, but I will try to fix it.

github-actions[bot] commented 4 months ago

Benchmark for 927a6de

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.1±0.74µs** | 252.2±1.18µs | **+1.65%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.02µs** | 15.6±0.26µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1364.4±30.44ns | **1342.5±5.22ns** | **-1.61%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.8±0.51µs | 195.4±0.54µs | -0.20% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1714.4±11.94µs | 1717.3±33.41µs | +0.17% | | crc32_resource_id_creation/compute_from_bytes:large | 86.6±0.30µs | 86.6±0.22µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.02µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.56ns | 92.4±0.47ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.2±0.42µs** | 64.9±0.23µs | **+1.09%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 934.1±4.29µs | 935.2±5.47µs | +0.12% | | index_build/index_build/../test-assets/ | **1062.7±5.62µs** | 1071.0±5.86µs | **+0.78%** |
github-actions[bot] commented 4 months ago

Benchmark for 4ecd73c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 248.3±1.08µs | 248.2±0.88µs | -0.04% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.18µs | 15.5±0.11µs | -0.64% | | blake3_resource_id_creation/compute_from_bytes:small | 1345.0±15.59ns | 1344.7±2.03ns | -0.02% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±2.65µs | 197.1±8.69µs | +0.87% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1711.3±11.87µs | 1710.3±15.40µs | -0.06% | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±1.20µs | 86.7±0.46µs | -0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.06µs | 5.4±0.07µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.24ns | 92.4±0.75ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.7±0.21µs | **64.3±0.42µs** | **-0.62%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 942.9±35.38µs | **930.4±10.20µs** | **-1.33%** | | index_build/index_build/../test-assets/ | 1062.5±3.60µs | 1065.6±4.27µs | +0.29% |
github-actions[bot] commented 4 months ago

Benchmark for a5bcec0

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 250.9±1.50µs | 252.1±1.83µs | +0.48% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.5±0.10µs | 15.6±0.24µs | +0.65% | | blake3_resource_id_creation/compute_from_bytes:small | 1344.4±2.14ns | 1343.3±2.02ns | -0.08% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±0.50µs | 195.5±0.84µs | +0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1709.3±4.26µs | 1712.0±22.00µs | +0.16% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.27µs | 86.8±0.39µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.01µs | 5.4±0.02µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.38ns | 92.4±0.68ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.51µs | 64.4±0.24µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.8±13.91µs | 934.6±4.87µs | +0.30% | | index_build/index_build/../test-assets/ | 1060.7±3.78µs | 1064.3±26.77µs | +0.34% |
github-actions[bot] commented 4 months ago

Benchmark for 743c7b4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.9±1.02µs** | 250.8±13.35µs | **+0.76%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.09µs** | 15.6±0.30µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1337.4±8.77ns | 1344.5±9.20ns | +0.53% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 198.3±0.46µs | **196.1±2.42µs** | **-1.11%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1731.1±13.08µs | **1714.9±19.79µs** | **-0.94%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.76µs | 87.3±2.51µs | +0.58% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.16µs | 5.4±0.02µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | **92.4±0.59ns** | 93.5±5.82ns | **+1.19%** | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.5±0.29µs** | 64.8±1.71µs | **+0.47%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 930.6±4.16µs | 933.3±8.22µs | +0.29% | | index_build/index_build/../test-assets/ | **1063.2±17.66µs** | 1088.7±105.51µs | **+2.40%** |
github-actions[bot] commented 4 months ago

Benchmark for 1ad2ac8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 247.5±1.68µs | 247.8±0.96µs | +0.12% | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.05µs** | 15.6±0.03µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | **1333.2±10.29ns** | 1342.0±7.77ns | **+0.66%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±0.76µs | 195.3±1.42µs | -0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1708.6±6.07µs** | 1715.5±13.10µs | **+0.40%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.44µs | 86.6±0.34µs | -0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.01µs | 5.4±0.02µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.68ns | 92.3±0.23ns | -0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.5±0.25µs | 64.5±0.91µs | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.7±3.11µs | 934.1±3.64µs | +0.26% | | index_build/index_build/../test-assets/ | 1059.7±5.17µs | 1060.8±25.16µs | +0.10% |
github-actions[bot] commented 4 months ago

Benchmark for e2b6788

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.9±0.99µs | **248.5±0.82µs** | **-1.35%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.14µs | 15.6±0.21µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1331.9±9.64ns** | 1345.5±15.97ns | **+1.02%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±1.68µs | 195.2±0.69µs | -0.10% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1711.5±6.73µs | 1714.1±20.24µs | +0.15% | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±0.44µs | 86.9±0.92µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | **5.4±0.04µs** | 5.5±0.27µs | **+1.85%** | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.62ns | 92.4±0.48ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 65.1±2.53µs | **64.7±0.38µs** | **-0.61%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **932.6±2.10µs** | 937.0±19.27µs | **+0.47%** | | index_build/index_build/../test-assets/ | 1063.1±6.35µs | 1060.7±10.66µs | -0.23% |
github-actions[bot] commented 4 months ago

Benchmark for ca57803

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.2±1.29µs** | 250.0±1.24µs | **+0.73%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.5±0.02µs | 15.5±0.07µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1344.6±1.87ns** | 1347.2±8.40ns | **+0.19%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±2.25µs | 195.5±1.42µs | +0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1713.1±4.65µs** | 1726.0±33.02µs | **+0.75%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.56µs | 86.7±0.56µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.01µs | 5.4±0.05µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.18ns | 92.3±0.40ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.7±0.28µs | 64.5±0.23µs | -0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 936.7±5.41µs | 937.9±1.94µs | +0.13% | | index_build/index_build/../test-assets/ | **1065.2±46.26µs** | 1195.2±5.55µs | **+12.20%** |
github-actions[bot] commented 4 months ago

Benchmark for f5ebe28

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 250.4±1.19µs | 251.5±2.57µs | +0.44% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.10µs | 15.7±0.21µs | +0.64% | | blake3_resource_id_creation/compute_from_bytes:small | 1350.3±9.94ns | 1345.9±8.18ns | -0.33% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.4±0.43µs | 195.1±0.49µs | -0.15% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1719.2±16.64µs | 1723.2±23.00µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.43µs | 87.0±2.13µs | +0.35% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.01µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.7±2.46ns | 92.4±0.52ns | -0.32% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±3.17µs | 64.7±2.22µs | -0.15% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 930.7±5.58µs | 933.3±17.78µs | +0.28% | | index_build/index_build/../test-assets/ | 1061.1±8.70µs | 1057.3±5.23µs | -0.36% |
github-actions[bot] commented 4 months ago

Benchmark for 6c8a30d

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 249.7±0.60µs | **248.9±0.73µs** | **-0.32%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.03µs** | 15.6±0.06µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | **1338.1±9.98ns** | 1347.8±5.58ns | **+0.72%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.1±0.39µs | 195.0±0.45µs | -0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1710.0±7.14µs | 1716.9±16.72µs | +0.40% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.23µs | 86.8±0.23µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.07µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.34ns | 92.3±0.23ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.4±0.19µs** | 64.8±1.32µs | **+0.62%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **933.7±4.92µs** | 945.4±5.75µs | **+1.25%** | | index_build/index_build/../test-assets/ | 1058.1±6.13µs | 1058.8±10.25µs | +0.07% |
Pushkarm029 commented 4 months ago

Finally, Java Linux CI Fixed.

Working on others.....

github-actions[bot] commented 4 months ago

Benchmark for 7fad8fe

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.1±0.79µs | **249.7±4.18µs** | **-0.56%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.07µs | 15.6±0.05µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1345.7±2.03ns | 1346.3±12.34ns | +0.04% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **196.2±0.65µs** | 198.0±1.10µs | **+0.92%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1718.1±5.02µs** | 1751.8±58.74µs | **+1.96%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.24µs | 86.7±0.45µs | -0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.7±2.86ns | 92.5±0.43ns | -0.22% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **63.9±0.21µs** | 64.6±0.15µs | **+1.10%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **931.6±7.94µs** | 936.7±3.41µs | **+0.55%** | | index_build/index_build/../test-assets/ | 1063.3±32.52µs | 1061.7±18.97µs | -0.15% |
github-actions[bot] commented 4 months ago

Benchmark for f11a263

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.0±0.33µs** | 249.1±0.90µs | **+0.44%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.5±0.06µs | 15.5±0.06µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1334.4±8.95ns | 1330.9±10.15ns | -0.26% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.1±0.48µs** | 195.6±1.44µs | **+0.26%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1713.2±5.59µs** | 1719.7±12.07µs | **+0.38%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.33µs | 86.7±0.59µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.65ns | 92.3±0.56ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.5±0.35µs | 64.6±1.07µs | +0.16% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 936.8±2.99µs | **931.6±4.83µs** | **-0.56%** | | index_build/index_build/../test-assets/ | 1059.0±3.88µs | 1059.9±2.89µs | +0.08% |
Pushkarm029 commented 4 months ago

MacOS fixed

github-actions[bot] commented 4 months ago

Benchmark for db6e906

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **251.0±1.07µs** | 252.2±1.09µs | **+0.48%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.10µs | 15.6±0.13µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1339.7±8.77ns** | 1354.6±19.52ns | **+1.11%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.1±0.74µs | 195.9±0.74µs | -0.10% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1726.3±6.36µs | **1717.5±14.37µs** | **-0.51%** | | crc32_resource_id_creation/compute_from_bytes:large | 87.0±0.25µs | 87.1±0.43µs | +0.11% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.05µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.43ns | 92.4±0.38ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 65.2±0.28µs | **64.8±1.20µs** | **-0.61%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 937.6±12.10µs | 939.8±8.48µs | +0.23% | | index_build/index_build/../test-assets/ | 1069.8±6.79µs | 1063.6±6.82µs | -0.58% |
github-actions[bot] commented 4 months ago

Benchmark for 02c60c6

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.9±1.14µs | 252.6±1.01µs | +0.28% | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.06µs** | 15.6±0.05µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1343.1±4.49ns | 1344.8±1.91ns | +0.13% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.1±0.49µs | 195.1±0.41µs | 0.00% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1712.5±5.27µs** | 1719.4±24.67µs | **+0.40%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.25µs | 86.7±0.25µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.06µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.24ns | 92.3±0.31ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.6±0.21µs | 64.8±0.29µs | +0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.2±4.80µs | 932.1±2.19µs | +0.10% | | index_build/index_build/../test-assets/ | 1062.7±33.62µs | 1060.6±6.57µs | -0.20% |
github-actions[bot] commented 4 months ago

Benchmark for 8304118

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 250.5±0.74µs | **249.1±0.80µs** | **-0.56%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.10µs** | 15.6±0.04µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1343.5±1.35ns | 1342.5±3.80ns | -0.07% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.2±0.43µs** | 195.7±1.85µs | **+0.26%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1748.2±5.60µs | **1724.5±20.57µs** | **-1.36%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±0.27µs | 87.0±0.73µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.01µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.42ns | 92.3±0.41ns | -0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.7±0.30µs | 64.4±0.32µs | -0.46% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 936.1±4.39µs | **929.0±6.24µs** | **-0.76%** | | index_build/index_build/../test-assets/ | 1056.7±3.48µs | 1058.5±4.67µs | +0.17% |
github-actions[bot] commented 4 months ago

Benchmark for 465db2a

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **249.4±2.33µs** | 251.4±0.70µs | **+0.80%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.08µs** | 15.6±0.09µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1344.0±3.86ns | 1345.4±3.08ns | +0.10% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.2±0.66µs | 195.8±0.75µs | -0.20% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1725.8±6.19µs | 1730.9±25.79µs | +0.30% | | crc32_resource_id_creation/compute_from_bytes:large | 87.0±0.39µs | 87.1±0.70µs | +0.11% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.36ns | 92.4±0.33ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.6±0.20µs** | 65.4±0.97µs | **+1.24%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 950.1±8.19µs | **940.2±4.77µs** | **-1.04%** | | index_build/index_build/../test-assets/ | 1069.9±5.91µs | 1068.7±10.07µs | -0.11% |
github-actions[bot] commented 4 months ago

Benchmark for 3de07be

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 249.3±1.81µs | 250.3±1.45µs | +0.40% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.19µs | 15.6±0.05µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1372.0±21.17ns | **1345.1±4.24ns** | **-1.96%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.1±0.46µs | 195.7±0.66µs | -0.20% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1718.5±7.64µs | 1718.8±20.81µs | +0.02% | | crc32_resource_id_creation/compute_from_bytes:large | 87.0±0.57µs | 86.8±0.46µs | -0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.01µs | 5.4±0.13µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.5±0.65ns | 92.3±0.35ns | -0.22% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.7±0.55µs** | 67.4±0.44µs | **+4.17%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.2±4.01µs | 929.7±5.88µs | -0.16% | | index_build/index_build/../test-assets/ | 1057.1±8.37µs | 1060.9±28.23µs | +0.36% |
github-actions[bot] commented 4 months ago

Benchmark for 1ab46ea

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 250.0±2.17µs | **249.2±0.72µs** | **-0.32%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.03µs | 15.6±0.38µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1395.6±2.02ns | **1348.4±2.62ns** | **-3.38%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.3±0.25µs | **195.0±0.38µs** | **-0.15%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1718.0±5.68µs | 1714.3±11.00µs | -0.22% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.33µs | 86.8±0.38µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.01µs | 5.4±0.07µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.53ns | 92.5±0.72ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.6±0.30µs | 64.5±0.52µs | -0.15% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | **930.2±3.42µs** | 933.5±2.31µs | **+0.35%** | | index_build/index_build/../test-assets/ | 1062.8±8.24µs | 1061.5±7.24µs | -0.12% |
github-actions[bot] commented 4 months ago

Benchmark for d997b10

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.0±1.69µs | 251.3±2.91µs | +0.12% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.21µs | 15.6±0.05µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1344.8±17.75ns | 1342.8±11.24ns | -0.15% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.3±0.69µs | 195.4±2.74µs | +0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1717.4±6.18µs** | 1727.7±18.00µs | **+0.60%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.61µs | 86.8±0.53µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.05µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.5±0.80ns | 92.5±0.82ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.7±0.32µs | 64.8±0.84µs | +0.15% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 931.5±5.23µs | 934.3±4.35µs | +0.30% | | index_build/index_build/../test-assets/ | 1060.9±11.36µs | 1059.7±6.54µs | -0.11% |
github-actions[bot] commented 4 months ago

Benchmark for 67cb5fb

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.6±0.64µs | **247.9±0.77µs** | **-1.47%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.07µs** | 15.6±0.10µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | **1344.2±2.64ns** | 1347.8±2.43ns | **+0.27%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.3±1.20µs | 195.0±0.52µs | -0.15% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1714.7±31.59µs | 1717.3±14.08µs | +0.15% | | crc32_resource_id_creation/compute_from_bytes:large | 86.6±0.38µs | 86.8±2.91µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.02µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.30ns | 92.4±0.42ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.5±0.31µs | **64.2±0.23µs** | **-0.47%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 934.8±5.08µs | 932.7±2.30µs | -0.22% | | index_build/index_build/../test-assets/ | 1059.6±5.40µs | 1060.5±7.92µs | +0.08% |
github-actions[bot] commented 4 months ago

Benchmark for 19a1035

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 248.5±0.99µs | 249.1±1.14µs | +0.24% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.09µs | 15.6±0.13µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1343.3±3.61ns** | 1349.4±3.47ns | **+0.45%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 195.5±0.49µs | 195.4±0.37µs | -0.05% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1711.6±7.70µs** | 1743.3±56.87µs | **+1.85%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.9±0.40µs | 86.9±0.35µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.10µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.38ns | 92.5±1.21ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **64.4±0.19µs** | 64.7±0.53µs | **+0.47%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 937.9±3.86µs | **933.1±4.30µs** | **-0.51%** | | index_build/index_build/../test-assets/ | 1066.7±5.13µs | **1057.0±5.38µs** | **-0.91%** |
github-actions[bot] commented 4 months ago

Benchmark for 3201633

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 248.4±1.61µs | 247.9±0.58µs | -0.20% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.06µs | **15.5±0.11µs** | **-0.64%** | | blake3_resource_id_creation/compute_from_bytes:small | **1334.0±10.17ns** | 1343.9±4.47ns | **+0.74%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.3±0.63µs** | 197.1±0.48µs | **+0.92%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1712.5±14.32µs** | 1735.1±17.80µs | **+1.32%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.6±0.24µs | 86.7±0.78µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.03µs | 5.4±0.11µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.23ns | 92.3±0.24ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 65.0±0.27µs | **64.2±0.20µs** | **-1.23%** | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 937.5±8.28µs | 933.4±7.25µs | -0.44% | | index_build/index_build/../test-assets/ | 1062.4±7.79µs | 1060.0±6.95µs | -0.23% |
github-actions[bot] commented 4 months ago

Benchmark for 7ae751a

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 271.1±9.59µs | 273.2±14.99µs | +0.77% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.05µs | 15.6±0.11µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | **1342.4±9.78ns** | 1351.4±4.70ns | **+0.67%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 199.6±1.82µs | 199.9±3.07µs | +0.15% | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1788.9±26.93µs** | 1826.4±53.68µs | **+2.10%** | | crc32_resource_id_creation/compute_from_bytes:large | 99.6±5.56µs | 102.7±9.62µs | +3.11% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.5±0.53ns | 92.5±0.41ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 68.2±1.43µs | 68.4±1.04µs | +0.29% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 992.1±20.55µs | 1003.5±25.00µs | +1.15% | | index_build/index_build/../test-assets/ | **1137.3±23.12µs** | 1167.5±47.57µs | **+2.66%** |
github-actions[bot] commented 4 months ago

Benchmark for dd90029

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 249.4±0.92µs | 249.0±1.09µs | -0.16% | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.03µs | 15.6±0.13µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1374.1±10.10ns | **1337.1±13.26ns** | **-2.69%** | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.3±0.51µs | **195.3±0.75µs** | **-0.51%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1710.8±5.14µs** | 1719.4±37.60µs | **+0.50%** | | crc32_resource_id_creation/compute_from_bytes:large | 87.0±0.31µs | 86.9±0.35µs | -0.11% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.04µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.24ns | 92.4±0.57ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.4±0.25µs | 64.5±0.50µs | +0.16% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 951.0±4.44µs | **929.8±4.42µs** | **-2.23%** | | index_build/index_build/../test-assets/ | 1059.0±6.30µs | 1062.1±23.39µs | +0.29% |
github-actions[bot] commented 4 months ago

Benchmark for aecee32

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | **248.6±0.87µs** | 249.8±0.47µs | **+0.48%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.26µs | 15.6±0.03µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1349.1±4.65ns | 1350.0±7.09ns | +0.07% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.3±1.27µs | **195.1±1.14µs** | **-0.61%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | 1720.9±7.28µs | 1720.4±34.94µs | -0.03% | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±0.53µs | 87.1±2.69µs | +0.35% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.15µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.24ns | 92.3±0.36ns | -0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.7±0.41µs | 64.9±0.25µs | +0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 933.7±2.30µs | **930.3±4.74µs** | **-0.36%** | | index_build/index_build/../test-assets/ | 1057.6±6.01µs | 1063.0±6.19µs | +0.51% |
github-actions[bot] commented 4 months ago

Benchmark for cc6997c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.4±1.90µs | **248.4±0.93µs** | **-1.19%** | | blake3_resource_id_creation/compute_from_bytes:medium | 15.6±0.07µs | 15.6±0.30µs | 0.00% | | blake3_resource_id_creation/compute_from_bytes:small | 1342.5±2.46ns | 1344.3±3.62ns | +0.13% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 196.5±1.27µs | **195.5±0.58µs** | **-0.51%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1708.4±9.73µs** | 1720.2±30.06µs | **+0.69%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.7±0.42µs | 86.9±0.40µs | +0.23% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.25µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.3±0.23ns | 92.4±0.26ns | +0.11% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.9±0.30µs | 64.7±0.21µs | -0.31% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 937.9±6.90µs | 933.5±8.68µs | -0.47% | | index_build/index_build/../test-assets/ | 1064.6±23.33µs | 1061.1±5.27µs | -0.33% |
github-actions[bot] commented 4 months ago

Benchmark for fde3f17

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | blake3_resource_id_creation/compute_from_bytes:large | 251.6±0.52µs | **247.2±0.61µs** | **-1.75%** | | blake3_resource_id_creation/compute_from_bytes:medium | **15.5±0.05µs** | 15.6±0.03µs | **+0.65%** | | blake3_resource_id_creation/compute_from_bytes:small | 1342.4±8.91ns | 1338.4±10.11ns | -0.30% | | blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg | **195.0±0.34µs** | 196.0±2.45µs | **+0.51%** | | blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf | **1711.6±5.26µs** | 1724.8±17.61µs | **+0.77%** | | crc32_resource_id_creation/compute_from_bytes:large | 86.8±1.93µs | 86.9±1.05µs | +0.12% | | crc32_resource_id_creation/compute_from_bytes:medium | 5.4±0.02µs | 5.4±0.03µs | 0.00% | | crc32_resource_id_creation/compute_from_bytes:small | 92.4±0.31ns | 92.4±0.24ns | 0.00% | | crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg | 64.8±0.37µs | 65.1±0.38µs | +0.46% | | crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf | 936.6±4.74µs | 933.9±13.87µs | -0.29% | | index_build/index_build/../test-assets/ | **1062.2±4.43µs** | 1076.5±98.72µs | **+1.35%** |