Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fs-storage and publish Java package #94

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

Conversation

oluiscabral
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for 1e22079

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.6±1.02µs 249.3±2.75µs -0.52%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.08µs 15.6±0.07µs +0.65%
blake3_resource_id_creation/compute_from_bytes:small 1364.4±13.09ns 1358.5±12.96ns -0.43%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.7±0.49µs 196.3±0.64µs -0.20%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1686.9±17.12µs 1687.6±12.86µs +0.04%
crc32_resource_id_creation/compute_from_bytes:large 86.8±1.36µs 86.6±0.44µs -0.23%
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.5±1.25ns 92.4±0.46ns -0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.5±0.25µs 64.6±1.23µs +0.16%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 914.8±13.21µs 913.1±2.91µs -0.19%
resource_index/index_build//tmp/ark-fs-index-benchmarksghImDQ 113.7±1.60ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksnmtVQ3 114.4±1.24ms N/A N/A
resource_index/index_get_resource_by_id 95.5±0.42ns 99.3±0.85ns +3.98%
resource_index/index_get_resource_by_path 60.7±4.53ns 60.3±5.00ns -0.66%
resource_index/index_update_all 1150.4±46.47ms 1137.7±42.92ms -1.10%
resource_index/index_update_one 681.6±35.37ms 682.4±27.28ms +0.12%

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for ca7196f

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.3±0.78µs 249.6±1.54µs -0.28%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.06µs 15.6±0.10µs +0.65%
blake3_resource_id_creation/compute_from_bytes:small 1359.0±3.56ns 1361.0±5.49ns +0.15%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 197.0±0.42µs 197.7±2.35µs +0.36%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1691.3±9.00µs 1704.1±18.10µs +0.76%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.56µs 86.8±0.45µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.14µs 5.4±0.03µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.36ns 92.3±0.23ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.4±0.23µs 64.5±1.63µs +0.16%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 912.2±6.05µs 917.3±5.00µs +0.56%
resource_index/index_build//tmp/ark-fs-index-benchmarkslchewx 112.2±1.33ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksoOKC0i 113.5±1.28ms N/A N/A
resource_index/index_get_resource_by_id 96.5±0.68ns 97.9±0.80ns +1.45%
resource_index/index_get_resource_by_path 57.8±4.69ns 64.0±6.22ns +10.73%
resource_index/index_update_all 1088.3±33.12ms 1130.0±38.68ms +3.83%
resource_index/index_update_one 672.4±19.32ms 683.5±23.00ms +1.65%

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for ef870fd

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.2±0.99µs 249.4±1.16µs -0.32%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.18µs 15.6±0.20µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1359.4±2.04ns 1363.0±12.30ns +0.26%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.4±0.48µs 197.4±3.03µs +0.51%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1686.0±21.79µs 1709.3±73.20µs +1.38%
crc32_resource_id_creation/compute_from_bytes:large 86.6±0.36µs 86.9±0.49µs +0.35%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.06µs 5.4±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.25ns 92.4±0.64ns +0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.4±0.78µs 64.6±0.26µs +0.31%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 912.8±8.24µs 915.3±4.40µs +0.27%
resource_index/index_build//tmp/ark-fs-index-benchmarksCrZGTO 115.3±1.09ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksm6d5wp 113.4±2.69ms N/A N/A
resource_index/index_get_resource_by_id 93.9±1.60ns 96.7±1.40ns +2.98%
resource_index/index_get_resource_by_path 52.3±3.41ns 58.1±5.72ns +11.09%
resource_index/index_update_all 1107.7±35.20ms 1121.2±40.85ms +1.22%
resource_index/index_update_one 665.3±25.58ms 655.4±21.78ms -1.49%

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for d3bd137

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 249.7±1.50µs 251.9±0.57µs +0.88%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.10µs 15.6±0.06µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1359.4±2.19ns 1355.2±22.12ns -0.31%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.7±0.40µs 196.9±0.94µs +0.10%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1675.4±10.18µs 1691.3±32.90µs +0.95%
crc32_resource_id_creation/compute_from_bytes:large 86.9±0.41µs 87.1±1.06µs +0.23%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.31µs 5.4±0.01µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.42ns 92.3±0.40ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.5±0.42µs 64.8±0.40µs +0.47%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 921.1±2.56µs 917.7±7.32µs -0.37%
resource_index/index_build//tmp/ark-fs-index-benchmarksaEkw8m 111.6±1.36ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarkstzJrDV 111.9±2.85ms N/A N/A
resource_index/index_get_resource_by_id 96.8±0.57ns 96.7±0.50ns -0.10%
resource_index/index_get_resource_by_path 58.0±4.04ns 59.6±3.57ns +2.76%
resource_index/index_update_all 1123.6±38.42ms 1143.4±47.07ms +1.76%
resource_index/index_update_one 690.9±26.97ms 683.6±26.90ms -1.06%

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for c2f4c49

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 252.8±2.39µs 249.2±1.96µs -1.42%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.06µs 15.6±0.08µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1360.9±3.31ns 1361.4±3.77ns +0.04%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 197.1±0.29µs 196.9±1.45µs -0.10%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1687.3±18.23µs 1686.6±33.92µs -0.04%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.36µs 86.6±0.23µs -0.23%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.04µs 5.4±0.14µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.4±0.23ns 92.4±0.67ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.4±0.73µs 64.3±0.34µs -0.16%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 915.3±4.47µs 913.3±4.83µs -0.22%
resource_index/index_build//tmp/ark-fs-index-benchmarksNQm7TB 108.4±1.66ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksyNETd8 109.8±2.07ms N/A N/A
resource_index/index_get_resource_by_id 96.8±0.55ns 97.6±3.12ns +0.83%
resource_index/index_get_resource_by_path 56.0±1.96ns 62.6±4.69ns +11.79%
resource_index/index_update_all 1091.8±36.68ms 1100.1±37.18ms +0.76%
resource_index/index_update_one 654.0±16.21ms 672.0±22.77ms +2.75%

Copy link

github-actions bot commented Nov 1, 2024

Benchmark for 3da4d0c

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.8±0.42µs 247.1±0.86µs -1.48%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.03µs 15.5±0.06µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1363.8±5.55ns 1349.1±7.06ns -1.08%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 195.7±0.38µs 198.3±0.59µs +1.33%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1686.4±6.18µs 1703.1±35.70µs +0.99%
crc32_resource_id_creation/compute_from_bytes:large 86.7±0.29µs 86.8±0.36µ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.6±2.28ns 92.4±0.44ns -0.22%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.5±0.19µs 64.7±0.27µs +0.31%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 919.4±2.58µs 916.0±4.53µs -0.37%
resource_index/index_build//tmp/ark-fs-index-benchmarks3Dw1Hh 112.8±0.86ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarks8t4pkI 111.5±1.12ms N/A N/A
resource_index/index_get_resource_by_id 101.3±0.90ns 94.4±0.52ns -6.81%
resource_index/index_get_resource_by_path 55.9±3.07ns 50.4±0.62ns -9.84%
resource_index/index_update_all 1098.9±34.02ms 1131.8±49.00ms +2.99%
resource_index/index_update_one 683.4±28.28ms 667.8±28.65ms -2.28%

@oluiscabral oluiscabral requested a review from kirillt November 1, 2024 21:49
@Pushkarm029 Pushkarm029 self-requested a review November 3, 2024 05:04
Copy link
Collaborator

@Pushkarm029 Pushkarm029 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes needed; overall, it looks good.

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
java/lib/build.gradle.kts Outdated Show resolved Hide resolved
java/lib/build.gradle.kts Outdated Show resolved Hide resolved
Copy link

Benchmark for 113f173

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.2±1.93µs 249.5±1.12µs -0.28%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.03µs 15.8±0.29µs +1.94%
blake3_resource_id_creation/compute_from_bytes:small 1351.2±9.81ns 1350.4±8.99ns -0.06%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.4±1.45µs 197.1±1.77µs +0.36%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1709.1±19.09µs 1708.8±46.78µs -0.02%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.20µs 86.7±0.36µs -0.12%
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.75ns 92.6±1.43ns +0.22%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.4±0.20µs 64.6±0.79µs +0.31%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 921.6±5.70µs 912.3±6.04µs -1.01%
resource_index/index_build//tmp/ark-fs-index-benchmarksGd3NgA 114.7±1.24ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksTZi3NO 102.7±2.37ms N/A N/A
resource_index/index_get_resource_by_id 99.1±0.81ns 98.1±0.72ns -1.01%
resource_index/index_get_resource_by_path 53.3±0.87ns 52.5±0.71ns -1.50%
resource_index/index_update_all 1144.3±38.07ms 1111.6±57.44ms -2.86%
resource_index/index_update_one 694.3±27.00ms 673.1±26.57ms -3.05%

Copy link

Benchmark for e0121b1

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 248.6±1.74µs 248.0±1.04µs -0.24%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.07µs 15.6±0.06µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1366.4±3.39ns 1365.8±4.04ns -0.04%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.5±1.17µs 197.2±0.49µs +0.36%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1704.0±3.58µs 1705.2±16.24µs +0.07%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.23µs 86.8±0.26µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.02µs 5.4±0.20µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.36ns 92.7±2.76ns +0.43%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.3±1.23µs 64.6±1.05µs -1.07%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 910.7±4.03µs 914.5±4.06µs +0.42%
resource_index/index_build//tmp/ark-fs-index-benchmarksWIb7It 107.6±2.11ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksnX1iJI 109.0±2.11ms N/A N/A
resource_index/index_get_resource_by_id 95.4±0.66ns 98.9±0.69ns +3.67%
resource_index/index_get_resource_by_path 57.4±1.12ns 52.9±0.53ns -7.84%
resource_index/index_update_all 1097.9±34.32ms 1142.2±39.43ms +4.03%
resource_index/index_update_one 672.7±23.62ms 678.1±22.63ms +0.80%

Copy link

Benchmark for ba0c3da

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 249.1±1.68µs 252.6±1.22µs +1.41%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.06µs 15.5±0.05µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1365.8±4.42ns 1367.9±16.15ns +0.15%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.4±0.83µs 196.9±1.15µs +0.25%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1711.4±6.92µs 1709.7±15.63µs -0.10%
crc32_resource_id_creation/compute_from_bytes:large 86.6±0.18µs 86.9±1.93µs +0.35%
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.38ns 92.4±0.59ns +0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.6±0.20µs 64.4±1.37µs -0.31%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 912.1±2.35µs 908.8±4.44µs -0.36%
resource_index/index_build//tmp/ark-fs-index-benchmarksEsuzw6 104.3±1.68ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarkskh0QpE 106.7±2.81ms N/A N/A
resource_index/index_get_resource_by_id 113.2±2.92ns 102.3±0.69ns -9.63%
resource_index/index_get_resource_by_path 50.1±0.55ns 61.3±0.37ns +22.36%
resource_index/index_update_all 1128.5±36.13ms 1123.2±66.12ms -0.47%
resource_index/index_update_one 666.7±30.99ms 676.0±29.24ms +1.39%

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
Copy link

Benchmark for 7c743f2

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 248.2±1.54µs 247.9±1.00µs -0.12%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.06µs 15.5±0.08µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1366.4±4.86ns 1366.5±5.93ns +0.01%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.2±0.46µs 197.8±1.36µs +0.82%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1708.3±5.40µs 1705.2±12.11µs -0.18%
crc32_resource_id_creation/compute_from_bytes:large 86.7±0.18µs 86.7±0.41µ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.33ns 92.4±0.49ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.2±1.88µs 64.9±2.62µs -0.46%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 910.5±7.41µs 910.0±5.52µs -0.05%
resource_index/index_build//tmp/ark-fs-index-benchmarks7hgZWf 104.3±2.60ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksiwz1me 113.2±1.44ms N/A N/A
resource_index/index_get_resource_by_id 99.3±0.55ns 102.8±0.66ns +3.52%
resource_index/index_get_resource_by_path 54.6±0.71ns 57.1±4.17ns +4.58%
resource_index/index_update_all 1118.0±43.61ms 1106.5±44.90ms -1.03%
resource_index/index_update_one 655.6±23.40ms 674.2±27.73ms +2.84%

Copy link

Benchmark for 7290f2d

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.7±0.82µs 251.8±2.04µs +1.66%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.05µs 15.5±0.05µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1366.2±2.16ns 1412.7±15.93ns +3.40%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.9±2.01µs 197.0±0.57µs +0.05%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1703.3±5.75µs 1709.5±8.20µs +0.36%
crc32_resource_id_creation/compute_from_bytes:large 87.0±0.71µs 87.0±0.56µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.04µs 5.4±0.04µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.4±1.31ns 92.4±0.41ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.6±0.25µs 64.6±0.41µs 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 915.5±5.18µs 914.4±13.03µs -0.12%
resource_index/index_build//tmp/ark-fs-index-benchmarksGB3LUd 111.5±0.66ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksvzHYF5 107.1±1.18ms N/A N/A
resource_index/index_get_resource_by_id 97.8±0.72ns 115.8±2.11ns +18.40%
resource_index/index_get_resource_by_path 53.4±0.51ns 56.5±3.26ns +5.81%
resource_index/index_update_all 1104.4±31.33ms 1102.8±46.04ms -0.14%
resource_index/index_update_one 664.2±23.14ms 665.6±19.22ms +0.21%

Copy link

Benchmark for c862088

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.6±1.52µs 252.0±1.01µs +0.56%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.10µs 15.6±0.07µs +0.65%
blake3_resource_id_creation/compute_from_bytes:small 1365.4±1.74ns 1365.1±2.55ns -0.02%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.5±0.72µs 196.9±0.39µs +0.20%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1704.7±5.61µs 1714.7±15.84µs +0.59%
crc32_resource_id_creation/compute_from_bytes:large 86.7±0.41µs 86.8±0.31µs +0.12%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.01µs 5.4±0.03µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.4±0.57ns 92.5±1.96ns +0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.4±0.26µs 64.4±0.31µs 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 914.0±3.20µs 913.3±6.01µs -0.08%
resource_index/index_build//tmp/ark-fs-index-benchmarksARZ1G0 112.2±1.32ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksiaHN1Y 111.5±2.17ms N/A N/A
resource_index/index_get_resource_by_id 99.1±2.03ns 98.1±1.25ns -1.01%
resource_index/index_get_resource_by_path 53.7±1.22ns 56.1±3.53ns +4.47%
resource_index/index_update_all 1127.4±43.60ms 1146.4±56.92ms +1.69%
resource_index/index_update_one 700.9±28.67ms 695.5±26.62ms -0.77%

@Pushkarm029
Copy link
Collaborator

@oluiscabral Let me know when you are ready for the final review.

Copy link

Benchmark for e8fad36

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.9±1.62µs 248.5±2.21µs +0.24%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.04µs 15.5±0.02µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1363.6±6.33ns 1357.5±9.62ns -0.45%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 195.9±0.33µs 197.6±1.54µs +0.87%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1713.3±72.98µs 1712.9±34.02µs -0.02%
crc32_resource_id_creation/compute_from_bytes:large 86.7±0.35µs 87.3±2.42µs +0.69%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.05µs 5.4±0.01µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.19ns 92.4±0.24ns +0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.6±0.52µs 64.7±0.50µs +0.15%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 909.1±2.28µs 912.0±17.42µs +0.32%
resource_index/index_build//tmp/ark-fs-index-benchmarksSswDTI 105.6±2.72ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksraE1lR 106.2±2.33ms N/A N/A
resource_index/index_get_resource_by_id 101.9±3.87ns 101.9±3.48ns 0.00%
resource_index/index_get_resource_by_path 53.5±0.52ns 53.3±1.15ns -0.37%
resource_index/index_update_all 1094.5±33.61ms 1107.7±43.72ms +1.21%
resource_index/index_update_one 659.7±21.24ms 673.3±21.80ms +2.06%

Copy link

Benchmark for 47a5554

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 249.0±0.89µs 249.8±2.52µs +0.32%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.08µs 15.5±0.06µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1364.2±4.88ns 1366.6±3.98ns +0.18%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.1±0.50µs 197.5±2.03µs +0.71%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1714.5±6.89µs 1718.8±20.36µs +0.25%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.33µs 86.6±0.29µs -0.23%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.07µs 5.4±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.29ns 92.3±0.32ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.6±0.48µs 64.8±0.42µs +0.31%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 916.6±6.90µs 913.3±5.18µs -0.36%
resource_index/index_build//tmp/ark-fs-index-benchmarks6sGJvc 112.7±1.99ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksHLdbkK 111.6±0.81ms N/A N/A
resource_index/index_get_resource_by_id 104.1±3.02ns 101.1±2.37ns -2.88%
resource_index/index_get_resource_by_path 53.3±2.46ns 52.9±0.56ns -0.75%
resource_index/index_update_all 1131.7±41.31ms 1133.6±51.64ms +0.17%
resource_index/index_update_one 689.5±30.30ms 682.2±23.85ms -1.06%

Copy link

Benchmark for 8f9ea0f

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 249.8±2.96µs 248.8±6.20µs -0.40%
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 1368.9±21.47ns 1366.8±3.21ns -0.15%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.5±3.70µs 198.6±5.68µs +1.07%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1703.9±16.02µs 1706.0±24.44µs +0.12%
crc32_resource_id_creation/compute_from_bytes:large 86.6±0.22µs 86.8±1.07µs +0.23%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.05µs 5.4±0.03µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.3±0.29ns 92.4±0.57ns +0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.3±0.49µs 64.3±0.37µs 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 916.5±11.42µs 929.1±11.40µs +1.37%
resource_index/index_build//tmp/ark-fs-index-benchmarks6JOgcg 107.6±1.97ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksRRjzyV 108.2±2.28ms N/A N/A
resource_index/index_get_resource_by_id 102.3±4.04ns 104.3±2.33ns +1.96%
resource_index/index_get_resource_by_path 53.1±0.74ns 54.0±0.78ns +1.69%
resource_index/index_update_all 1112.2±33.22ms 1099.7±41.87ms -1.12%
resource_index/index_update_one 676.4±25.16ms 660.8±27.07ms -2.31%

Copy link

Benchmark for 3b7ea9d

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 251.4±1.61µs 250.6±11.06µs -0.32%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.05µs 15.5±0.06µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1349.7±2.32ns 1349.6±2.54ns -0.01%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.4±0.61µs 196.5±0.99µs +0.05%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1696.6±8.34µs 1700.8±22.93µs +0.25%
crc32_resource_id_creation/compute_from_bytes:large 91.8±0.52µs 91.7±0.25µs -0.11%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.04µs 5.7±0.04µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.4±0.33ns 96.5±1.49ns +0.10%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.9±0.46µs 64.5±0.27µs -0.62%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 918.9±11.01µs 930.6±7.38µs +1.27%
resource_index/index_build//tmp/ark-fs-index-benchmarksLrnhvj 112.1±2.20ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksfHGhvV 112.6±1.25ms N/A N/A
resource_index/index_get_resource_by_id 98.5±1.56ns 102.3±2.44ns +3.86%
resource_index/index_get_resource_by_path 50.3±0.81ns 54.5±1.06ns +8.35%
resource_index/index_update_all 1165.8±45.97ms 1176.4±39.07ms +0.91%
resource_index/index_update_one 685.9±27.88ms 695.1±29.37ms +1.34%

Copy link

Benchmark for 905472d

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.6±1.51µs 249.0±1.89µs +0.57%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.03µs 15.5±0.07µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1349.6±1.89ns 1364.5±23.52ns +1.10%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.6±0.64µs 196.4±1.71µs -0.10%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1693.7±15.82µs 1695.7±20.51µs +0.12%
crc32_resource_id_creation/compute_from_bytes:large 92.0±0.95µs 92.0±0.62µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.02µs 5.7±0.07µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.4±0.34ns 96.4±0.26ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.9±0.92µs 64.2±0.41µs -1.08%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 922.6±11.06µs 918.9±3.42µs -0.40%
resource_index/index_build//tmp/ark-fs-index-benchmarksS7W6yR 102.0±1.50ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksVOf21K 108.0±3.09ms N/A N/A
resource_index/index_get_resource_by_id 104.0±2.30ns 107.3±2.74ns +3.17%
resource_index/index_get_resource_by_path 53.6±0.51ns 54.9±1.99ns +2.43%
resource_index/index_update_all 1092.0±23.85ms 1110.5±42.46ms +1.69%
resource_index/index_update_one 661.7±21.06ms 664.3±25.64ms +0.39%

Copy link

Benchmark for 37c6660

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 251.1±3.51µs 250.1±1.49µs -0.40%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.06µs 15.5±0.07µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1349.8±1.94ns 1347.2±4.52ns -0.19%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.5±0.55µs 196.1±0.96µs -0.20%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1691.6±8.58µs 1689.6±9.25µs -0.12%
crc32_resource_id_creation/compute_from_bytes:large 91.8±0.42µs 91.7±0.38µs -0.11%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.02µs 5.7±0.03µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.5±0.77ns 96.3±0.27ns -0.21%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.7±0.27µs 64.4±0.44µs -0.46%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 940.3±3.59µs 923.6±13.18µs -1.78%
resource_index/index_build//tmp/ark-fs-index-benchmarksHmttLq 103.6±2.75ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksfI6dvd 104.3±3.66ms N/A N/A
resource_index/index_get_resource_by_id 120.6±1.26ns 102.9±1.68ns -14.68%
resource_index/index_get_resource_by_path 56.9±1.80ns 55.8±1.81ns -1.93%
resource_index/index_update_all 1084.0±35.65ms 1072.7±49.79ms -1.04%
resource_index/index_update_one 661.7±28.32ms 649.7±23.47ms -1.81%

Copy link

Benchmark for 97659e5

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 248.6±0.83µs 248.7±2.01µs +0.04%
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 1349.3±1.45ns 1351.0±6.31ns +0.13%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.7±0.84µs 196.2±3.14µs -0.25%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1694.8±4.79µs 1703.9±14.67µs +0.54%
crc32_resource_id_creation/compute_from_bytes:large 91.9±0.28µs 91.9±0.66µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.11µs 5.7±0.04µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.4±0.44ns 96.4±0.35ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.8±0.40µs 64.5±0.23µs -0.46%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 917.5±2.29µs 919.2±5.40µs +0.19%
resource_index/index_build//tmp/ark-fs-index-benchmarks2i9588 113.5±2.60ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksWWNTre 113.2±0.59ms N/A N/A
resource_index/index_get_resource_by_id 115.7±2.23ns 108.1±4.76ns -6.57%
resource_index/index_get_resource_by_path 54.1±0.54ns 54.8±0.79ns +1.29%
resource_index/index_update_all 1114.5±36.47ms 1122.1±47.93ms +0.68%
resource_index/index_update_one 680.4±23.75ms 687.0±21.04ms +0.97%

@oluiscabral
Copy link
Collaborator Author

So just to let you guys know, @Pushkarm029 and @kirillt, after a thorough analysis with the team, this PR will be updated to transform the ark-core/java library into AAR instead of JAR.

I'll be pushing those updates next

Alright, @Pushkarm029 and @kirillt, now ark-core/java is an AAR! 🎉

The published package (AAR) is currently being referenced at ARK-Builders/ark-android#110

Comment on lines 24 to 37
with:
toolchain: nightly # nightly is required for fmt
components: rustfmt, clippy

- name: Check
run: cargo check

- name: Format
run: |
cargo fmt --all -- --check
cargo clippy --workspace --bins -- -D warnings

- name: Build Debug
run: cargo build --verbose
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pushkarm029 @kirillt I removed those steps for now, because the behavior of the Format was not being 100% predictable. Since I started this PR, around a month ago, the Format step changed its results multiple times, even though the Rust code remained exactly the same

As example, you can check that from time to time some old and recent jobs didn't fully complete because formatting errors were randomly being thrown.

Most recent occurrence:

I judge as a bad practice using a nightly or any other "dynamic" version to format a project, since it can introduce errors from newly added formatting features 🤔

Curious to know what you guys think about it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting point. Actually, I prefer setting up cargo fmt everywhere, because it helps to avoid inconsistent code style (and standard Rust code style looks pretty fine). But I've never encountered cargo fmt check rejecting a bit outdated codebase.

My guess is that the code style used by cargo fmt develops including new decisions made by Rust community. And out code is modified too slowly so we don't include these new updates. If this is true, then we could keep cargo fmt check and actually reformat the code every time we encounter such failures on CI, but only manually.

@Pushkarm029 what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use nightly for formatting because some of the rules we define in rustfmt.toml are only supported in the nightly version. Rust nightly is updated frequently, that’s not a problem — it’s the pre-release version. We have two options:
• We can abandon the rules we’ve defined (I would like to keep them)
• We can check for formatting in a separate job that runs nightly, within the same workflow.
For example:

jobs:
  format:
    name: Code Formatting Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Nightly Rust with rustfmt
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: nightly
          components: rustfmt

      - name: Run rustfmt
        run: cargo fmt --all -- --check

  build_and_test:
    name: Build and Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Stable Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable

      ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually care about formatting only during merging, so we probably can configure GitHub rules and prevent merge if cargo fmt job fails specifically. This would allow see that the build itself works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oluiscabral I think we don't have cargo clippy --workspace --bins -- -D warnings anymore..

Not sure if it's really any valuable though, does anyone looks into CI warnings? 🤔

cc @tareknaser @Pushkarm029

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think cargo clippy --workspace --bins -- -D warnings is necessary, It helps us catch common mistakes, anti-patterns, and potential improvements that the compiler doesn't check for.

So, I suggest we should add it between the format and build-and-test job.

@kirillt kirillt requested a review from Pushkarm029 December 14, 2024 04:00
@tareknaser tareknaser self-requested a review December 14, 2024 09:37
Copy link

Benchmark for 6cb015b

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 248.7±1.68µs 248.9±2.78µs +0.08%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.15µs 15.5±0.03µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1350.2±2.39ns 1353.2±4.26ns +0.22%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 197.2±0.99µs 196.0±0.82µs -0.61%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1707.3±15.66µs 1720.3±30.53µs +0.76%
crc32_resource_id_creation/compute_from_bytes:large 92.5±0.74µs 92.4±0.63µs -0.11%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.02µs 5.7±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.5±0.98ns 96.4±0.51ns -0.10%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.0±0.50µs 65.1±0.69µs +0.15%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 922.6±7.51µs 933.8±6.06µs +1.21%
resource_index/index_build//tmp/ark-fs-index-benchmarksY5ILfY 144.3±9.15ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksyo3zYj 139.9±9.31ms N/A N/A
resource_index/index_get_resource_by_id 101.7±4.17ns 103.1±2.85ns +1.38%
resource_index/index_get_resource_by_path 52.8±0.38ns 65.9±1.02ns +24.81%
resource_index/index_update_all 1221.6±45.73ms 1205.9±46.56ms -1.29%
resource_index/index_update_one 722.3±20.95ms 722.9±23.76ms +0.08%

.github/workflows/build.yml Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 getting this warning locally, and I can also see it in the CI:

> Task :lib:compileReleaseJavaWithJavac
Java compiler version 22 has deprecated support for compiling with source/target version 8.
warning: [options] source value 8 is obsolete and will be removed in a future release
Try one of the following options:
    1. [Recommended] Use Java toolchain with a lower language version
    2. Set a higher source/target version
    3. Use a lower version of the JDK running the build (if you're not using Java toolchain)
For more details on how to configure these settings, see https://developer.android.com/build/jdks.
To suppress this warning, set android.javaCompile.suppressSourceTargetDeprecationWarning=true in gradle.properties.
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 8 is obsolete and will be removed in a future release

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I see, I'll investigate it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaahh, that's why would be great to move all the Java code to ark-android.. especially after we switched from JAR to AAR, so we don't do "plain Java" anymore and really only use Java for Android..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Maybe we could even move the JNI Rust related code to ark-android then, since it is specifically related to Java as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oluiscabral exactly! do you think it's reasonable amount of work for the current pair of PRs, or should we merge these first, and proceed with refactoring in new PRs?

Comment on lines +20 to +21
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add these targets to the instructions in java/README.md, specifically the rustup command?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, do you mean to add a step-by-step on how to locally cross-compile the library?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried running this locally, it failed because I didn’t have these targets set up, and I had to debug it myself. It would be helpful to include a command for adding these targets as a perquisite, something like:

rustup target add \
    aarch64-linux-android \
    armv7-linux-androideabi \
    ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, let’s include a note about the supported ndkVersion, because running this with a different version also causes it to completely fail locally for me (I had version 28.0.12674087. This is why I suggested #94 (comment))

with an annoying error as well (I think it said something like ndk not installed)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tareknaser this one seems to be resolved, right?

java/lib/build.gradle Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we really need a separate workflow just for the cache (.github/workflows/cache.yml). I see that it only runs on push/PR to the main branch. Can we modify the save condition in the main workflow to:

save-if: ${{ github.ref == 'refs/heads/main' }}

and remove the redundant workflow?

Copy link
Member

@kirillt kirillt Dec 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whether we keep this workflow or not, I don’t think it’s worth running it on macOS ARM (macos-13-xlarge) with every push to main. We only use the macOS ARM workflow in the weekly build since it’s a paid runner.
Or, we could increase the retention period for this specific GitHub Actions artifact.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and remove the redundant workflow?

Agreed

Comment on lines 24 to 37
with:
toolchain: nightly # nightly is required for fmt
components: rustfmt, clippy

- name: Check
run: cargo check

- name: Format
run: |
cargo fmt --all -- --check
cargo clippy --workspace --bins -- -D warnings

- name: Build Debug
run: cargo build --verbose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use nightly for formatting because some of the rules we define in rustfmt.toml are only supported in the nightly version. Rust nightly is updated frequently, that’s not a problem — it’s the pre-release version. We have two options:
• We can abandon the rules we’ve defined (I would like to keep them)
• We can check for formatting in a separate job that runs nightly, within the same workflow.
For example:

jobs:
  format:
    name: Code Formatting Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Nightly Rust with rustfmt
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: nightly
          components: rustfmt

      - name: Run rustfmt
        run: cargo fmt --all -- --check

  build_and_test:
    name: Build and Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Stable Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable

      ...

Copy link

Benchmark for 0bdc6d5

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.9±0.87µs 250.8±1.01µs +1.17%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.05µs 15.5±0.02µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1350.8±14.05ns 1349.8±4.68ns -0.07%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 197.7±1.15µs 195.6±0.61µs -1.06%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1723.3±8.43µs 1695.1±20.23µs -1.64%
crc32_resource_id_creation/compute_from_bytes:large 92.1±1.22µs 91.9±0.38µs -0.22%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.05µs 5.7±0.01µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.3±0.33ns 96.5±1.34ns +0.21%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.0±0.62µs 64.5±0.71µs -0.77%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 915.9±5.95µs 923.8±8.23µs +0.86%
resource_index/index_build//tmp/ark-fs-index-benchmarksiU0a2j 107.3±2.27ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarkstfnnRB 107.2±1.00ms N/A N/A
resource_index/index_get_resource_by_id 107.8±5.35ns 104.9±3.32ns -2.69%
resource_index/index_get_resource_by_path 53.0±1.35ns 65.6±1.10ns +23.77%
resource_index/index_update_all 1083.9±30.97ms 1110.0±41.85ms +2.41%
resource_index/index_update_one 651.3±19.05ms 667.6±15.78ms +2.50%

Copy link

Benchmark for 89e2920

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.8±0.66µs 250.1±0.80µs -0.28%
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 1350.2±7.40ns 1350.8±8.96ns +0.04%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.8±2.16µs 196.0±1.71µs -0.41%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1692.9±13.14µs 1697.8±23.52µs +0.29%
crc32_resource_id_creation/compute_from_bytes:large 92.1±1.19µs 92.2±1.64µs +0.11%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.01µs 5.7±0.04µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.4±0.46ns 96.4±0.48ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.9±1.65µs 64.5±0.28µs -0.62%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 919.5±28.42µs 918.3±12.45µs -0.13%
resource_index/index_build//tmp/ark-fs-index-benchmarksJIe4IJ 103.4±1.80ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksZ00RNF 109.4±1.89ms N/A N/A
resource_index/index_get_resource_by_id 104.6±4.48ns 104.9±5.17ns +0.29%
resource_index/index_get_resource_by_path 52.8±0.95ns 66.3±1.56ns +25.57%
resource_index/index_update_all 1104.1±23.11ms 1104.5±40.73ms +0.04%
resource_index/index_update_one 664.6±20.89ms 663.2±25.13ms -0.21%

Copy link

Benchmark for 165583e

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 248.1±1.38µs 251.5±1.94µs +1.37%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.03µs 15.5±0.06µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1350.0±3.66ns 1349.9±2.02ns -0.01%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 197.2±2.57µs 195.7±0.44µs -0.76%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1727.8±13.35µs 1705.4±17.82µs -1.30%
crc32_resource_id_creation/compute_from_bytes:large 92.2±1.74µs 91.8±0.37µs -0.43%
crc32_resource_id_creation/compute_from_bytes:medium 5.8±0.40µs 5.7±0.02µs -1.72%
crc32_resource_id_creation/compute_from_bytes:small 96.4±0.27ns 96.3±0.14ns -0.10%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.9±1.02µs 64.4±0.67µs -0.77%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 918.9±3.78µs 923.4±4.08µs +0.49%
resource_index/index_build//tmp/ark-fs-index-benchmarksIvhxcK 111.0±3.58ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksTuEGSa 112.2±2.08ms N/A N/A
resource_index/index_get_resource_by_id 102.2±0.80ns 103.2±4.99ns +0.98%
resource_index/index_get_resource_by_path 57.5±1.05ns 66.5±1.19ns +15.65%
resource_index/index_update_all 1136.8±41.52ms 1168.0±66.70ms +2.74%
resource_index/index_update_one 688.7±28.85ms 700.3±29.48ms +1.68%

Copy link

Benchmark for 315e023

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.7±0.99µs 248.7±3.74µs +0.40%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.63µs 15.5±0.04µs -0.64%
blake3_resource_id_creation/compute_from_bytes:small 1349.7±3.94ns 1350.8±4.87ns +0.08%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.8±0.35µs 195.9±1.20µs -0.46%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1691.8±5.64µs 1702.1±22.28µs +0.61%
crc32_resource_id_creation/compute_from_bytes:large 91.6±0.41µs 91.7±0.34µs +0.11%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.02µs 5.7±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.3±0.20ns 96.5±0.93ns +0.21%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.5±0.56µs 64.6±0.50µs +0.16%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 919.9±4.31µs 921.5±4.86µs +0.17%
resource_index/index_build//tmp/ark-fs-index-benchmarkscdULPU 112.1±0.60ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksplCbME 102.7±2.89ms N/A N/A
resource_index/index_get_resource_by_id 99.1±0.71ns 102.3±3.67ns +3.23%
resource_index/index_get_resource_by_path 52.5±0.40ns 65.6±0.55ns +24.95%
resource_index/index_update_all 1068.1±25.74ms 1109.7±36.22ms +3.89%
resource_index/index_update_one 654.0±23.76ms 670.1±19.38ms +2.46%

Copy link

Benchmark for 7255d80

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 247.5±1.00µs 247.6±2.13µs +0.04%
blake3_resource_id_creation/compute_from_bytes:medium 15.7±0.06µs 15.5±0.05µs -1.27%
blake3_resource_id_creation/compute_from_bytes:small 1350.1±1.90ns 1348.7±2.29ns -0.10%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 195.9±0.52µs 195.9±0.55µs 0.00%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1691.6±3.99µs 1708.1±28.99µs +0.98%
crc32_resource_id_creation/compute_from_bytes:large 91.7±0.21µs 91.7±0.42µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.7±0.02µs 5.7±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 96.3±0.31ns 96.4±0.20ns +0.10%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.5±0.93µs 64.6±1.14µs +0.16%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 924.4±58.90µs 925.7±21.68µs +0.14%
resource_index/index_build//tmp/ark-fs-index-benchmarksbYlXIy 104.2±1.52ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksohF5FG 103.5±1.40ms N/A N/A
resource_index/index_get_resource_by_id 105.3±1.80ns 103.3±2.33ns -1.90%
resource_index/index_get_resource_by_path 53.2±0.44ns 65.1±1.02ns +22.37%
resource_index/index_update_all 1090.7±26.46ms 1092.3±50.61ms +0.15%
resource_index/index_update_one 652.3±23.36ms 638.7±16.27ms -2.08%

Copy link

Benchmark for d37222c

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 251.1±0.50µs 249.1±8.14µs -0.80%
blake3_resource_id_creation/compute_from_bytes:medium 15.6±0.12µs 15.6±0.03µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1347.6±1.59ns 1380.7±6.07ns +2.46%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.9±0.49µs 197.1±1.00µs +0.10%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1733.4±9.26µs 1698.9±10.00µs -1.99%
crc32_resource_id_creation/compute_from_bytes:large 86.9±0.36µs 86.8±0.19µs -0.12%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.02µs 5.4±0.06µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.2±1.32ns 92.1±0.46ns -0.11%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 64.8±0.31µs 64.9±0.86µs +0.15%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 927.0±4.22µs 924.4±16.27µs -0.28%
resource_index/index_build//tmp/ark-fs-index-benchmarksnXJM7o 110.1±2.79ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarkssgHlxX 107.7±1.57ms N/A N/A
resource_index/index_get_resource_by_id 102.7±1.27ns 102.6±1.89ns -0.10%
resource_index/index_get_resource_by_path 53.9±0.73ns 53.3±0.54ns -1.11%
resource_index/index_update_all 1123.0±42.61ms 1162.6±48.92ms +3.53%
resource_index/index_update_one 670.4±26.66ms 686.9±26.71ms +2.46%

@tareknaser tareknaser mentioned this pull request Dec 19, 2024
* refactor(CI): move Java bindings into a separate job
* chore(CI): remove old benchmark workflow and integrate into build process
* refactor(CI): consolidate OS jobs into a single build-and-test job
---
Signed-off-by: Tarek <[email protected]>
Copy link

github-actions bot commented Jan 4, 2025

Benchmark for aa5a35c

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 253.1±1.41µs 249.0±1.34µs -1.62%
blake3_resource_id_creation/compute_from_bytes:medium 15.7±0.05µs 15.7±0.12µs 0.00%
blake3_resource_id_creation/compute_from_bytes:small 1434.0±65.11ns 1458.5±16.85ns +1.71%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 196.1±0.55µs 195.2±0.58µs -0.46%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1697.6±4.68µs 1704.7±16.37µs +0.42%
crc32_resource_id_creation/compute_from_bytes:large 87.4±1.42µs 87.1±0.25µs -0.34%
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.7±1.76ns 92.5±0.59ns -0.22%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 62.5±0.30µs 62.7±0.31µs +0.32%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 913.0±3.41µs 918.2±7.97µs +0.57%
resource_index/index_build//tmp/ark-fs-index-benchmarksHWxWnK 103.8±1.31ms N/A N/A
resource_index/index_build//tmp/ark-fs-index-benchmarksgnVMem 101.8±2.15ms N/A N/A
resource_index/index_get_resource_by_id 97.5±0.91ns 98.5±1.67ns +1.03%
resource_index/index_get_resource_by_path 53.0±0.35ns 53.1±0.37ns +0.19%
resource_index/index_update_all 1098.4±39.97ms 1152.0±58.91ms +4.88%
resource_index/index_update_one 678.0±28.91ms 697.9±38.93ms +2.94%

Copy link
Collaborator

@Pushkarm029 Pushkarm029 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@oluiscabral, Let's resolve the minor changes now and save the major ones for the next PR or create an issue for them. This PR is already quite large and has been open for months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants