Skip to content

Commit a4bcd6d

Browse files
authored
Add arrow-avro Decoder Benchmarks (#8025)
# Which issue does this PR close? - Part of #4886 # Rationale for this change This change introduces a comprehensive benchmark suite for the `arrow-avro` decoder. Having robust benchmarks is crucial for several reasons: - It allows for the measurement and tracking of decoding performance over time. - It helps identify performance regressions or improvements as the codebase evolves. - It provides a standardized way to evaluate the impact of optimizations and new features. # What changes are included in this PR? This PR adds a new benchmark file: `arrow-avro/benches/decoder.rs`. The key components of this new file are: - **Comprehensive Type Coverage**: Adds benchmark scenarios for a wide range of data types, including: - Primitive types (`Int32`, `Int64`, `Float32`, `Float64`, `Boolean`) - Binary and String types (`Binary(Bytes)`, `String`, `StringView`) - Logical types (`Date32`, `TimeMillis`, `TimeMicros`, `TimestampMillis`, `TimestampMicros`, `Decimal128`, `UUID`, `Interval`, `Enum`) - Complex types (`Map`, `Array`, `Nested(Struct)`) - `FixedSizeBinary` - A `Mixed` schema with multiple fields - Update to criterion 7.0.0 - Made `mod schema` public # Are these changes tested? These changes are covered by the benchmark tests themselves. # Are there any user-facing changes? N/A
1 parent 5036ca8 commit a4bcd6d

File tree

2 files changed

+524
-1
lines changed

2 files changed

+524
-1
lines changed

arrow-avro/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,20 @@ rand = { version = "0.9.1", default-features = false, features = [
6565
"std_rng",
6666
"thread_rng",
6767
] }
68-
criterion = { version = "0.6.0", default-features = false }
68+
criterion = { version = "0.7.0", default-features = false }
6969
tempfile = "3.3"
7070
arrow = { workspace = true }
7171
futures = "0.3.31"
7272
bytes = "1.10.1"
7373
async-stream = "0.3.6"
74+
apache-avro = "0.14.0"
75+
num-bigint = "0.4"
76+
once_cell = "1.21.3"
7477

7578
[[bench]]
7679
name = "avro_reader"
7780
harness = false
81+
82+
[[bench]]
83+
name = "decoder"
84+
harness = false

0 commit comments

Comments
 (0)