Skip to content

Commit 9e1c07d

Browse files
committed
chore
1 parent a91bcc6 commit 9e1c07d

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

datafusion/datasource-json/benches/json_boundary.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use arrow::datatypes::{DataType, Field, Schema};
1919
use async_trait::async_trait;
2020
use bytes::Bytes;
21-
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
21+
use criterion::{Criterion, Throughput, criterion_group, criterion_main};
2222
use datafusion_datasource::file::FileSource;
2323
use datafusion_datasource::file_groups::FileGroup;
2424
use datafusion_datasource::file_scan_config::FileScanConfigBuilder;
@@ -284,19 +284,17 @@ fn bench_json_boundary(c: &mut Criterion) {
284284
let exec_bytes = measure_datasource_exec_bytes(&rt, &fixture);
285285

286286
let mut exec_group = c.benchmark_group("json_boundary_datasource_exec");
287-
// The read_bytes tag is the primary signal; time reflects simulated CPU cost.
288-
exec_group.bench_function(
289-
BenchmarkId::new("execute", format!("read_bytes={exec_bytes}")),
290-
|b| {
291-
b.iter(|| {
292-
fixture.store.reset();
293-
rt.block_on(run_datasource_exec(
294-
Arc::clone(&fixture.exec),
295-
Arc::clone(&fixture.task_ctx),
296-
));
297-
});
298-
},
299-
);
287+
exec_group.throughput(Throughput::Bytes(exec_bytes));
288+
// Fixed benchmark id for baseline comparisons; read_bytes is reported as throughput.
289+
exec_group.bench_function("execute", |b| {
290+
b.iter(|| {
291+
fixture.store.reset();
292+
rt.block_on(run_datasource_exec(
293+
Arc::clone(&fixture.exec),
294+
Arc::clone(&fixture.task_ctx),
295+
));
296+
});
297+
});
300298
exec_group.finish();
301299
}
302300

0 commit comments

Comments
 (0)