Skip to content

Commit 20434b0

Browse files
friendlymatthewadriangbclaude
authored
Reduce parquet struct projection benchmark data volume (#21187)
This PR reduces the data volume in the parquet struct projection benchmark so it runs faster. It amends the recently introduced benchmarks in #21180. --------- Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 07ddfd7 commit 20434b0

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

datafusion/core/benches/parquet_struct_projection.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ use parquet::file::properties::{WriterProperties, WriterVersion};
3838
use std::hint::black_box;
3939
use std::path::Path;
4040
use std::sync::Arc;
41+
use std::time::Duration;
4142
use tempfile::NamedTempFile;
4243
use tokio::runtime::Runtime;
4344

44-
const NUM_BATCHES: usize = 64;
45-
const WRITE_RECORD_BATCH_SIZE: usize = 4096;
46-
const ROW_GROUP_ROW_COUNT: usize = 65536;
47-
const EXPECTED_ROW_GROUPS: usize = 4;
48-
const LARGE_STRING_LEN: usize = 128 * 1024;
45+
const NUM_BATCHES: usize = 2;
46+
const WRITE_RECORD_BATCH_SIZE: usize = 256;
47+
const ROW_GROUP_ROW_COUNT: usize = 256;
48+
const EXPECTED_ROW_GROUPS: usize = 2;
49+
const LARGE_STRING_LEN: usize = 16 * 1024;
4950

5051
fn narrow_schema() -> SchemaRef {
5152
let struct_fields = Fields::from(vec![
@@ -209,6 +210,9 @@ fn narrow_benchmarks(c: &mut Criterion) {
209210
let ctx = create_context(&rt, &file_path, "t");
210211

211212
let mut group = c.benchmark_group("narrow_struct");
213+
group.sample_size(10);
214+
group.warm_up_time(Duration::from_secs(1));
215+
group.measurement_time(Duration::from_secs(2));
212216

213217
// baseline: full struct, must decode both leaves
214218
group.bench_function("select_struct", |b| {
@@ -253,6 +257,9 @@ fn wide_benchmarks(c: &mut Criterion) {
253257
let ctx = create_context(&rt, &file_path, "t");
254258

255259
let mut group = c.benchmark_group("wide_struct");
260+
group.sample_size(10);
261+
group.warm_up_time(Duration::from_secs(1));
262+
group.measurement_time(Duration::from_secs(2));
256263

257264
// baseline: full struct, must decode all 5 leaves
258265
group.bench_function("select_struct", |b| {
@@ -359,6 +366,9 @@ fn nested_benchmarks(c: &mut Criterion) {
359366
let ctx = create_context(&rt, &file_path, "t");
360367

361368
let mut group = c.benchmark_group("nested_struct");
369+
group.sample_size(10);
370+
group.warm_up_time(Duration::from_secs(1));
371+
group.measurement_time(Duration::from_secs(2));
362372

363373
// baseline: full outer struct, decode all 3 leaves
364374
group.bench_function("select_struct", |b| {

0 commit comments

Comments
 (0)