MCPcopy Create free account
hub / github.com/apache/arrow-rs / project_benchmark

Function project_benchmark

arrow-array/benches/record_batch.rs:46–70  ·  view source on GitHub ↗
(
    c: &mut Criterion,
    column_count: usize,
    row_count: usize,
    projection_size: usize,
)

Source from the content-addressed store, hash-verified

44}
45
46fn project_benchmark(
47 c: &mut Criterion,
48 column_count: usize,
49 row_count: usize,
50 projection_size: usize,
51) {
52 let input = make_input(column_count, row_count, projection_size);
53
54 c.bench_with_input(
55 BenchmarkId::new(
56 "project",
57 format!(
58 "{:?}x{:?} -> {:?}x{:?}",
59 input.0.num_columns(),
60 input.0.num_rows(),
61 input.1.len(),
62 input.0.num_rows()
63 ),
64 ),
65 &input,
66 |b, (rb, projection)| {
67 b.iter(|| black_box(rb.project(projection).unwrap()));
68 },
69 );
70}
71
72fn make_input(
73 column_count: usize,

Callers 1

criterion_benchmarkFunction · 0.85

Calls 3

make_inputFunction · 0.85
iterMethod · 0.45
projectMethod · 0.45

Tested by

no test coverage detected