Skip to content

fix: handle filtered criterion summaries - #1011

Merged
cdc-as81 merged 2 commits into
mainfrom
cdc-as81-fix-single-bench-panic
Jul 17, 2026
Merged

fix: handle filtered criterion summaries#1011
cdc-as81 merged 2 commits into
mainfrom
cdc-as81-fix-single-bench-panic

Conversation

@cdc-as81

Copy link
Copy Markdown
Collaborator

Summary

  • Prevent sample_single_excluding from panicking when Criterion filters skip benchmarks.
  • Print comparison summaries only for slice sizes with results from all three strategies.
  • Skip the summary when no complete comparison rows are available.
  • Add regression tests for empty, single-strategy, and partially complete results.

@github-actions

Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 3.5 ± 0.1 3.4 4.4 1.00
large_sir::baseline_households 3.5 ± 0.2 3.4 4.4 1.02 ± 0.06
large_sir::entities 8.4 ± 0.2 8.1 9.4 2.41 ± 0.12
large_sir::households 8.2 ± 0.6 7.8 10.8 2.37 ± 0.19

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_whole_population 10000 21.018% 18.380% 23.560%
indexing with_query_results_single_indexed_property_entities 3.002% 2.043% 4.005%
large_dataset bench_query_population_multi_unindexed_entities 2.528% 1.227% 4.104%
indexing with_query_results_multiple_individually_indexed_properties_enti 1.737% 1.323% 2.239%
counts index_after_adding_entities 1.394% 1.216% 1.566%
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_whole_population 100000 -28.498% -30.475% -26.609%
sample_entity sample_entity_whole_population 1000 -21.289% -23.751% -18.992%
sample_entity sample_entity_multi_property_indexed 1000 -6.223% -7.461% -5.014%
indexing query_people_multiple_individually_indexed_properties_entities -5.440% -5.764% -5.071%
sample_entity sample_entity_multi_property_indexed 10000 -4.749% -5.999% -3.549%
sample_entity sample_entity_single_property_indexed 1000 -4.219% -5.376% -3.066%
counts single_property_indexed_entities -3.819% -4.696% -3.082%
sample_entity sample_entity_multi_property_indexed 100000 -3.727% -4.600% -2.853%
large_dataset bench_query_population_derived_property_entities -2.467% -3.003% -1.866%
indexing query_people_count_multiple_individually_indexed_properties_enti -2.037% -2.205% -1.896%
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_single_property_indexed 10000 1.722% 0.407% 3.075%
sample_entity sample_entity_single_property_indexed 100000 1.643% 0.676% 2.637%
sampling count_and_sampling_single_known_length_entities -1.543% -2.254% -0.740%
examples example-basic-infection -1.412% -2.379% -0.557%
indexing query_people_indexed_multi-property_entities 1.222% 0.808% 1.591%
algorithm_benches algorithm_sampling_multiple_l_reservoir 1.033% 0.264% 2.231%
sampling count_and_sampling_single_unindexed_concrete_plus_derived_entiti -0.934% -1.233% -0.643%
large_dataset bench_filter_unindexed_entity 0.763% -2.655% 4.512%
sampling sampling_multiple_known_length_entities 0.756% 0.498% 1.055%
large_dataset bench_query_population_multi_indexed_entities 0.731% 0.345% 1.141%
counts concrete_plus_derived_unindexed_entities -0.710% -1.233% -0.259%
algorithm_benches algorithm_sampling_single_known_length 0.710% -1.329% 2.597%
counts multi_property_unindexed_entities 0.529% 0.277% 0.765%
examples example-births-deaths -0.529% -0.864% -0.211%
indexing query_people_single_indexed_property_entities -0.523% -1.084% -0.161%
sample_entity sample_entity_single_property_unindexed 100000 0.461% 0.291% 0.641%
indexing query_people_count_indexed_multi-property_entities -0.450% -1.207% 0.192%
counts multi_property_indexed_entities -0.427% -0.750% -0.166%
sample_entity sample_entity_single_property_unindexed 10000 0.380% 0.132% 0.771%
indexing with_query_results_indexed_multi-property_entities 0.375% -0.022% 0.924%
large_dataset bench_match_entity 0.321% -0.009% 0.765%
sampling sampling_single_l_reservoir_entities -0.238% -0.340% -0.147%
large_dataset bench_filter_indexed_entity -0.237% -2.112% 1.455%
large_dataset bench_query_population_property_entities 0.211% -0.269% 0.836%
sampling sampling_single_unindexed_concrete_plus_derived_entities -0.207% -0.278% -0.140%
sampling sampling_multiple_l_reservoir_entities -0.196% -0.325% -0.072%
sampling sampling_multiple_unindexed_entities -0.181% -0.244% -0.116%
sampling sampling_single_known_length_entities 0.166% -0.916% 1.291%
large_dataset bench_query_population_indexed_property_entities -0.140% -0.734% 0.270%
counts reindex_after_adding_more_entities -0.106% -0.354% 0.107%
algorithm_benches algorithm_sampling_single_rand_reservoir 0.095% -0.114% 0.459%
indexing query_people_count_single_indexed_property_entities 0.094% -0.538% 0.753%
counts single_property_unindexed_entities 0.093% -0.283% 0.620%
algorithm_benches algorithm_sampling_multiple_known_length 0.068% -0.377% 0.479%
algorithm_benches algorithm_sampling_single_l_reservoir 0.052% -0.327% 0.489%
sample_entity sample_entity_single_property_unindexed 1000 -0.023% -0.266% 0.391%
sampling sampling_single_unindexed_entities 0.004% -0.052% 0.053%
Not Compared (no baseline yet)
Group Bench Reason
(none)

github-actions Bot added a commit that referenced this pull request Jul 16, 2026

@RobertJacobsonCDC RobertJacobsonCDC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a nit pick, but can we put everything in the single ixa-bench/criterion/sample_single_excluding.rs file instead of having a new file ixa-bench/criterion/sample_single_excluding_summary.rs for the auxiliary types that are only used in sample_single_excluding.rs and a separate file ixa-bench/tests/sample_single_excluding_summary.rs just for tests? If we really need tests, just make it a tests submodule in ixa-bench/criterion/sample_single_excluding.rs like we normally do.

Also, do we really need the tests for this? I'd be tempted to leave them out, personally. But it's up to you.

github-actions Bot added a commit that referenced this pull request Jul 16, 2026
@github-actions

Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 3.3 ± 0.1 3.2 3.5 1.00 ± 0.02
large_sir::baseline_households 3.3 ± 0.0 3.2 3.4 1.00
large_sir::entities 7.3 ± 0.2 7.1 8.2 2.25 ± 0.06
large_sir::households 7.3 ± 0.6 6.9 9.5 2.23 ± 0.18

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_whole_population 1000 19.070% 15.301% 23.289%
sample_entity sample_entity_single_property_indexed 1000 18.346% 16.322% 20.393%
sample_entity sample_entity_whole_population 10000 14.095% 10.192% 18.335%
sample_entity sample_entity_single_property_indexed 10000 12.640% 11.110% 14.172%
large_dataset bench_query_population_indexed_property_entities 9.385% 2.860% 15.876%
sampling count_and_sampling_single_known_length_entities 7.708% 6.015% 9.185%
sample_entity sample_entity_single_property_unindexed 100000 7.689% 7.071% 8.316%
algorithm_benches algorithm_sampling_single_l_reservoir 3.507% 2.182% 5.080%
large_dataset bench_query_population_multi_indexed_entities 3.240% 2.286% 4.208%
counts single_property_indexed_entities 2.598% 2.259% 3.011%
indexing query_people_multiple_individually_indexed_properties_entities 1.532% 1.107% 1.990%
counts index_after_adding_entities 1.194% 1.092% 1.297%
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
large_dataset bench_query_population_derived_property_entities -10.129% -11.299% -8.972%
sample_entity sample_entity_whole_population 100000 -10.105% -13.207% -6.558%
large_dataset bench_match_entity -8.845% -9.749% -7.939%
sample_entity sample_entity_multi_property_indexed 10000 -6.460% -7.267% -5.587%
sample_entity sample_entity_multi_property_indexed 100000 -6.199% -7.134% -5.296%
sample_entity sample_entity_multi_property_indexed 1000 -4.817% -6.610% -3.017%
sample_entity sample_entity_single_property_indexed 100000 -3.379% -4.263% -2.438%
examples example-births-deaths -2.371% -2.593% -2.178%
indexing query_people_count_multiple_individually_indexed_properties_enti -2.157% -3.206% -1.083%
sampling count_and_sampling_single_unindexed_concrete_plus_derived_entiti -1.345% -1.445% -1.217%
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
counts multi_property_unindexed_entities 1.257% 0.694% 1.783%
sample_entity sample_entity_single_property_unindexed 1000 1.241% 0.656% 1.830%
counts single_property_unindexed_entities 1.146% 0.584% 1.868%
sampling sampling_single_unindexed_concrete_plus_derived_entities -1.062% -1.140% -0.987%
indexing with_query_results_single_indexed_property_entities 1.007% 0.311% 1.711%
large_dataset bench_filter_unindexed_entity 0.949% -2.377% 4.470%
sample_entity sample_entity_single_property_unindexed 10000 0.922% 0.502% 1.357%
indexing query_people_single_indexed_property_entities -0.881% -1.402% -0.384%
sampling sampling_multiple_l_reservoir_entities 0.865% 0.669% 1.052%
indexing query_people_count_single_indexed_property_entities 0.833% 0.144% 1.496%
counts concrete_plus_derived_unindexed_entities 0.757% 0.425% 1.109%
examples example-basic-infection -0.606% -1.048% -0.205%
algorithm_benches algorithm_sampling_multiple_known_length -0.605% -1.039% -0.218%
indexing query_people_count_indexed_multi-property_entities -0.599% -1.343% 0.146%
indexing query_people_indexed_multi-property_entities 0.583% 0.101% 1.074%
large_dataset bench_query_population_multi_unindexed_entities 0.539% 0.316% 0.885%
indexing with_query_results_indexed_multi-property_entities 0.522% -0.028% 1.042%
indexing with_query_results_multiple_individually_indexed_properties_enti 0.494% -0.112% 1.129%
counts multi_property_indexed_entities -0.485% -0.883% -0.075%
large_dataset bench_filter_indexed_entity -0.456% -2.028% 1.269%
sampling sampling_multiple_known_length_entities 0.322% 0.154% 0.484%
algorithm_benches algorithm_sampling_single_known_length -0.318% -1.654% 1.013%
large_dataset bench_query_population_property_entities 0.286% -0.239% 0.852%
counts reindex_after_adding_more_entities 0.239% -0.192% 0.686%
sampling sampling_single_known_length_entities -0.232% -1.277% 0.777%
sampling sampling_single_l_reservoir_entities 0.181% -0.392% 0.673%
sampling sampling_multiple_unindexed_entities -0.161% -0.385% 0.012%
algorithm_benches algorithm_sampling_single_rand_reservoir 0.124% -0.033% 0.280%
sampling sampling_single_unindexed_entities 0.020% -0.065% 0.142%
algorithm_benches algorithm_sampling_multiple_l_reservoir 0.004% -0.430% 0.432%
Not Compared (no baseline yet)
Group Bench Reason
(none)

@RobertJacobsonCDC RobertJacobsonCDC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cdc-as81
cdc-as81 merged commit e03d109 into main Jul 17, 2026
22 checks passed
@cdc-as81
cdc-as81 deleted the cdc-as81-fix-single-bench-panic branch July 17, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sample_single_excluding panics when you run a named benchmark group

3 participants