Skip to content

Commit 4173dc6

Browse files
committed
feat: update benchmark for schema decoding to include projection parameter
1 parent d0da5a5 commit 4173dc6

File tree

2 files changed

+9
-127
lines changed

2 files changed

+9
-127
lines changed

arrow-json/benches/json-reader.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,13 @@ fn bench_binary_hex(c: &mut Criterion) {
179179
bench_decode_binary(c, "decode_binary_view_hex_json", &binary_data, view_field);
180180
}
181181

182-
fn bench_decode_schema(c: &mut Criterion, name: &str, data: &[u8], schema: Arc<Schema>) {
182+
fn bench_decode_schema(
183+
c: &mut Criterion,
184+
name: &str,
185+
data: &[u8],
186+
schema: Arc<Schema>,
187+
projection: bool,
188+
) {
183189
let mut group = c.benchmark_group(name);
184190
group.throughput(Throughput::Bytes(data.len() as u64));
185191
group.sample_size(50);
@@ -228,6 +234,7 @@ fn bench_wide_projection(c: &mut Criterion) {
228234
"decode_wide_projection_full_json",
229235
&wide_projection_data,
230236
full_schema,
237+
false,
231238
);
232239

233240
// Projected schema: only 3 fields (f0, f10, f50) out of 100
@@ -237,6 +244,7 @@ fn bench_wide_projection(c: &mut Criterion) {
237244
"decode_wide_projection_narrow_json",
238245
&wide_projection_data,
239246
projected_schema,
247+
true,
240248
);
241249
}
242250

arrow-json/benches/reader.rs

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)