This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-11498-9138e59bda9506face4b6fbf694b00b9bf517a32 in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit 72887ed91c80002bb7ec755ce1e964bab07bebea Author: Huaijin <[email protected]> AuthorDate: Tue Oct 13 04:37:47 2026 +0000 chore: reduce `row_selection_cursor` benchmark runtime (#11498) # Which issue does this PR close? - follow up #11389 # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Please try to explain the problem you are trying to solve in terms of the user-visible behavior, rather than the implementation. --> The `row_selection_cursor` benchmark matrix contains 1,140 cases, making a full run expensive. Reduce the parameter combinations while retaining all four selection distributions, both input backings, and all three execution policies. # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Reduce the matrix from 1,140 to 288 cases: - Keep average selector lengths `[4, 28, 32, 40]`, covering fragmented selections and values around the default Auto threshold of 32. - Keep column counts `[2, 8, 32]`. - Keep Utf8View lengths `[8, 16, 256]`, covering inline, short non-inline, and longer strings. - Remove `dtype/int32`, which duplicates the baseline Int32 input. Set the warmup time to 2 seconds and the sample size to 50. Retain the default 5-second measurement target. # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests, if so identify these tests)? If this PR claims a performance improvement, please include evidence such as benchmark results. DO NOT simply paste a list of commands ran to verify the code; this is what our CI is for and it pollutes the PR. ONLY explain if testing was included with this PR, or why it wasn't. --> # Are there any significant user-facing changes? <!-- Significant user-facing changes include: - Breaking public API change - Significant change to existing functionality (e.g. function returns something different) These need to be explicitly called out to ensure we have proper documentation if required and to ensure we follow proper semantic versioning. DO NOT restate the changes of this PR; if a bug was fixed and already explained above, we don't need this to be restated as a user-facing change. --> --- parquet/benches/row_selection_cursor.rs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/parquet/benches/row_selection_cursor.rs b/parquet/benches/row_selection_cursor.rs index 7926e0b301..84343ac7d7 100644 --- a/parquet/benches/row_selection_cursor.rs +++ b/parquet/benches/row_selection_cursor.rs @@ -34,9 +34,14 @@ use rand::{RngExt, SeedableRng}; const TOTAL_ROWS: usize = 1 << 20; const BATCH_SIZE: usize = 1 << 10; const BASE_SEED: u64 = 0xA55AA55A; -const AVG_SELECTOR_LENGTHS: &[usize] = &[4, 8, 12, 16, 20, 24, 28, 32, 36, 40]; -const COLUMN_WIDTHS: &[usize] = &[2, 4, 8, 16, 32]; -const UTF8VIEW_LENS: &[usize] = &[4, 8, 16, 32, 64, 128, 256]; +// 4 exercises fragmented selections; 28, 32, and 40 cover average run lengths +// below, at, and above the default Auto threshold of 32. +const AVG_SELECTOR_LENGTHS: &[usize] = &[4, 28, 32, 40]; +// 2, 8, and 32 exercise narrow, medium, and wide projections. +const COLUMN_WIDTHS: &[usize] = &[2, 8, 32]; +// 8 exercises inline Utf8View values, 16 crosses the 12-byte inline limit, +// and 256 exercises longer strings. +const UTF8VIEW_LENS: &[usize] = &[8, 16, 256]; const BENCH_MODES: &[BenchMode] = &[BenchMode::Selector, BenchMode::Mask, BenchMode::Auto]; const BACKINGS: &[Backing] = &[Backing::Selectors, Backing::Mask]; @@ -46,10 +51,6 @@ struct DataProfile { } const DATA_PROFILES: &[DataProfile] = &[ - DataProfile { - name: "int32", - build_batch: build_int32_batch, - }, DataProfile { name: "float64", build_batch: build_float64_batch, @@ -253,7 +254,13 @@ fn bench_over_lengths( } } -criterion_group!(benches, criterion_benchmark); +criterion_group! { + name = benches; + config = Criterion::default() + .warm_up_time(std::time::Duration::from_secs(2)) + .sample_size(50); + targets = criterion_benchmark +} criterion_main!(benches); struct BenchInput {
