Skip to content

Commit 3f217f5

Browse files
authored
Align Criterion dependencies (#8758)
# Which issue does this PR close? None # Rationale for this change Move the Criterion version declaration up to the workspace level. This way all crates use the same version. # What changes are included in this PR? - Move Criterion version declaration up to the workspace Cargo.toml file - Bump version to 0.7.0 - Fix blackbox related deprecation warnings # Are these changes tested? Compiled bench configuration. I did not perform a full benchmark run of all benchmarks yet. # Are there any user-facing changes? No
1 parent 0051ee3 commit 3f217f5

File tree

15 files changed

+19
-14
lines changed

15 files changed

+19
-14
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ chrono = { version = "0.4.40", default-features = false, features = ["clock"] }
112112

113113
simdutf8 = { version = "0.1.5", default-features = false }
114114

115+
criterion = { version = "0.7.0", default-features = false }
116+
115117
# release inherited profile keeping debug information and symbols
116118
# for mem/cpu profiling
117119
[profile.profiling]

arrow-array/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ force_validate = []
5959

6060
[dev-dependencies]
6161
rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"] }
62-
criterion = { version = "0.5", default-features = false }
62+
criterion = { workspace = true, default-features = false }
6363

6464
[[bench]]
6565
name = "occupancy"

arrow-array/benches/record_batch.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
use arrow_array::{ArrayRef, Int64Array, RecordBatch, RecordBatchOptions};
1919
use arrow_schema::{DataType, Field, Schema, SchemaRef};
20-
use criterion::*;
20+
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
2121
use num_integer::Integer;
22+
use std::hint::black_box;
2223
use std::sync::Arc;
2324

2425
fn make_record_batch(column_count: usize, row_count: usize) -> RecordBatch {

arrow-array/benches/view_types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
// under the License.
1717

1818
use arrow_array::StringViewArray;
19-
use criterion::*;
19+
use criterion::{Criterion, criterion_group, criterion_main};
20+
use std::hint::black_box;
2021

2122
fn gen_view_array(size: usize) -> StringViewArray {
2223
StringViewArray::from_iter((0..size).map(|v| match v % 3 {

arrow-avro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ rand = { version = "0.9.1", default-features = false, features = [
7474
"std_rng",
7575
"thread_rng",
7676
] }
77-
criterion = { version = "0.7.0", default-features = false }
77+
criterion = { workspace = true, default-features = false }
7878
tempfile = "3.3"
7979
arrow = { workspace = true }
8080
futures = "0.3.31"

arrow-buffer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ num-traits = { version = "0.2.19", default-features = false, features = ["std"]
4545
half = { version = "2.1", default-features = false }
4646

4747
[dev-dependencies]
48-
criterion = { version = "0.5", default-features = false }
48+
criterion = { workspace = true, default-features = false }
4949
rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"] }
5050

5151
[[bench]]

arrow-cast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ base64 = "0.22"
5656
ryu = "1.0.16"
5757

5858
[dev-dependencies]
59-
criterion = { version = "0.5", default-features = false }
59+
criterion = { workspace = true, default-features = false }
6060
half = { version = "2.1", default-features = false }
6161
rand = "0.9"
6262

arrow-ipc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ default = []
5050
lz4 = ["lz4_flex"]
5151

5252
[dev-dependencies]
53-
criterion = "0.5.1"
53+
criterion = { workspace = true }
5454
tempfile = "3.3"
5555
tokio = "1.43.0"
5656
# used in benches

arrow-json/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ serde = { version = "1.0", default-features = false, features = ["derive"] }
5959
futures = "0.3"
6060
tokio = { version = "1.27", default-features = false, features = ["io-util"] }
6161
bytes = "1.4"
62-
criterion = { version = "0.5", default-features = false }
62+
criterion = { workspace = true, default-features = false }
6363
rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"] }
6464

6565
[[bench]]

arrow-schema/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bincode = { version = "2.0.1", default-features = false, features = [
5757
"std",
5858
"serde",
5959
] }
60-
criterion = { version = "0.5", default-features = false }
60+
criterion = { workspace = true, default-features = false }
6161
insta = "1.43.1"
6262

6363
[[bench]]

0 commit comments

Comments
 (0)