Skip to content

fix: execution stats availability messaging#890

Open
cdc-as81 wants to merge 3 commits into
mainfrom
cdc-as81-cpu-and-mem-not-available
Open

fix: execution stats availability messaging#890
cdc-as81 wants to merge 3 commits into
mainfrom
cdc-as81-cpu-and-mem-not-available

Conversation

@cdc-as81
Copy link
Copy Markdown
Collaborator

Summary

  • Distinguishes disabled execution resource stats from platform-unavailable resource stats.
  • Stops printing Memory and CPU statistics are not available on your platform. when profiling is not enabled.
  • Removes the runner’s unconditional WASM stats warning and keeps --no-stats behavior unchanged.

@github-actions
Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 3.0 ± 0.1 2.9 3.3 1.00
large_sir::entities 6.8 ± 0.2 6.5 7.8 2.26 ± 0.08

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
large_dataset bench_query_population_derived_property_entities 35.241% 32.280% 38.302%
sample_entity sample_entity_single_property_unindexed 10000 27.873% 27.203% 28.539%
examples example-births-deaths 24.353% 23.912% 24.800%
sample_entity sample_entity_single_property_unindexed 1000 17.827% 15.385% 20.262%
sample_entity sample_entity_single_property_indexed 10000 15.336% 14.329% 16.445%
sample_entity sample_entity_single_property_indexed 1000 10.874% 10.261% 11.477%
sample_entity sample_entity_single_property_indexed 100000 9.005% 8.367% 9.466%
large_dataset bench_match_entity 8.417% 6.174% 10.924%
indexing with_query_results_multiple_individually_indexed_properties_enti 5.558% 5.035% 6.115%
indexing query_people_indexed_multi-property_entities 5.176% 4.535% 5.870%
sampling sampling_multiple_l_reservoir_entities 4.558% 3.383% 5.778%
counts index_after_adding_entities 3.158% 2.777% 3.601%
sampling sampling_single_l_reservoir_entities 2.988% 2.017% 3.841%
sampling sampling_single_unindexed_concrete_plus_derived_entities 2.962% 1.419% 4.734%
counts reindex_after_adding_more_entities 2.009% 1.809% 2.219%
sampling count_and_sampling_single_known_length_entities 1.688% 1.099% 2.266%
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
indexing query_people_count_single_indexed_property_entities -5.070% -6.370% -3.941%
large_dataset bench_query_population_indexed_property_entities -4.402% -6.833% -2.065%
algorithm_benches algorithm_sampling_multiple_known_length -3.538% -3.804% -3.271%
sample_entity sample_entity_multi_property_indexed 10000 -3.449% -3.958% -2.913%
algorithm_benches algorithm_sampling_single_rand_reservoir -3.297% -3.618% -3.073%
examples example-basic-infection -3.099% -4.594% -1.549%
sample_entity sample_entity_multi_property_indexed 100000 -2.792% -3.262% -2.454%
sample_entity sample_entity_multi_property_indexed 1000 -2.209% -2.476% -1.817%
indexing query_people_count_multiple_individually_indexed_properties_enti -1.984% -2.436% -1.692%
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
large_dataset bench_filter_unindexed_entity 5.626% 0.482% 10.941%
sampling sampling_multiple_known_length_entities 1.477% 0.600% 2.575%
counts multi_property_indexed_entities -1.248% -1.647% -0.996%
indexing query_people_multiple_individually_indexed_properties_entities -1.074% -1.629% -0.543%
sample_entity sample_entity_single_property_unindexed 100000 -1.039% -1.721% -0.412%
large_dataset bench_query_population_multi_unindexed_entities -0.979% -1.514% -0.488%
algorithm_benches algorithm_sampling_single_known_length -0.893% -1.680% -0.271%
indexing query_people_count_indexed_multi-property_entities -0.891% -1.242% -0.503%
algorithm_benches algorithm_sampling_multiple_l_reservoir -0.874% -1.634% -0.086%
large_dataset bench_filter_indexed_entity 0.707% -12.455% 15.792%
counts single_property_indexed_entities -0.695% -1.608% 0.310%
counts single_property_unindexed_entities -0.595% -1.459% 0.089%
sampling count_and_sampling_single_unindexed_concrete_plus_derived_entiti 0.524% 0.339% 0.718%
sampling sampling_single_unindexed_entities 0.409% 0.057% 0.908%
algorithm_benches algorithm_sampling_single_l_reservoir 0.381% 0.126% 0.554%
sample_entity sample_entity_whole_population 10000 -0.317% -0.754% 0.036%
sampling sampling_single_known_length_entities -0.219% -1.225% 1.004%
large_dataset bench_query_population_property_entities -0.168% -0.769% 0.350%
counts concrete_plus_derived_unindexed_entities 0.162% -0.171% 0.583%
indexing with_query_results_indexed_multi-property_entities 0.143% -0.067% 0.385%
indexing with_query_results_single_indexed_property_entities -0.137% -0.644% 0.243%
sampling sampling_multiple_unindexed_entities 0.106% -0.049% 0.248%
sample_entity sample_entity_whole_population 1000 0.101% -0.140% 0.359%
indexing query_people_single_indexed_property_entities 0.062% -0.147% 0.331%
counts multi_property_unindexed_entities -0.038% -0.720% 0.413%
sample_entity sample_entity_whole_population 100000 0.029% -0.361% 0.549%
large_dataset bench_query_population_multi_indexed_entities -0.004% -0.307% 0.267%

github-actions Bot added a commit that referenced this pull request May 12, 2026
Copy link
Copy Markdown
Collaborator

@RobertJacobsonCDC RobertJacobsonCDC left a comment

Choose a reason for hiding this comment

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

This is really overwrought. I don't see any real advantage to introducing the ResourceStatisticsStatus enum and resource_statistics_status. You only have two call sites:

  1. print_execution_statistics
  2. log_execution_statistics

Since you're multiplying #[cfg(...)] attributes at every call site and in the definitions of ResourceStatisticsStatus / resource_statistics_status, you've actually make the implementation more complicated by spreading implementation support checks across three different places (on top of introducing a new enum and free function).

Instead, inline the platform support detection at each call site. The logic is something like:

if cfg!(feature = "profiling") {
  if cfg!(target_family = "wasm") {
    // Or maybe `info!`
    warn!("Memory and CPU statistics are not available on your platform.");
  }
  // Do whatever the function does when profiling is enabled.
} else {
  // Do whatever the function does when profiling is disabled.
}
// Do whatever the function does unconditionally.

Comment thread src/runner.rs
Comment thread src/execution_stats.rs Outdated
@cdc-as81 cdc-as81 changed the title fix: fix execution stats availability messaging fix: execution stats availability messaging May 19, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 3.3 ± 0.0 3.2 3.3 1.00
large_sir::baseline_households 3.3 ± 0.0 3.2 3.4 1.01 ± 0.02
large_sir::entities 7.4 ± 0.2 7.2 8.5 2.26 ± 0.06
large_sir::households 7.2 ± 0.1 7.1 7.5 2.21 ± 0.04

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
(none)
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
(none)
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
(none)
Not Compared (no baseline yet)
Group Bench Reason
(none)

github-actions Bot added a commit that referenced this pull request May 19, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 3.4 ± 0.0 3.4 3.6 1.00
large_sir::baseline_households 3.5 ± 0.1 3.4 3.7 1.01 ± 0.02
large_sir::entities 8.0 ± 0.1 7.8 8.3 2.32 ± 0.05
large_sir::households 7.9 ± 0.6 7.5 10.4 2.30 ± 0.17

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
(none)
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
(none)
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
(none)
Not Compared (no baseline yet)
Group Bench Reason
(none)

github-actions Bot added a commit that referenced this pull request May 19, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 2.6 ± 0.1 2.6 2.8 1.00
large_sir::baseline_households 2.7 ± 0.1 2.6 2.8 1.00 ± 0.03
large_sir::entities 5.1 ± 0.0 5.0 5.3 1.93 ± 0.04
large_sir::households 4.9 ± 0.0 4.9 5.0 1.86 ± 0.04

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
indexing query_people_count_single_indexed_property_entities 12.973% 10.355% 15.839%
sample_entity sample_entity_single_property_unindexed 1000 4.335% 2.429% 6.133%
sample_entity sample_entity_single_property_unindexed 10000 2.849% 1.259% 4.610%
sampling sampling_single_unindexed_concrete_plus_derived_entities 2.819% 2.458% 3.158%
indexing query_people_multiple_individually_indexed_properties_entities 2.380% 2.065% 2.649%
counts multi_property_unindexed_entities 2.012% 1.587% 2.471%
sampling count_and_sampling_single_known_length_entities 1.809% 1.331% 2.239%
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_whole_population 10000 -21.343% -22.486% -20.359%
sample_entity sample_entity_whole_population 1000 -20.621% -21.362% -19.907%
sample_entity sample_entity_whole_population 100000 -20.380% -21.228% -19.572%
counts multi_property_indexed_entities -8.861% -9.220% -8.441%
counts single_property_unindexed_entities -7.923% -9.048% -6.859%
indexing query_people_single_indexed_property_entities -5.624% -6.562% -4.691%
sample_entity sample_entity_single_property_indexed 10000 -3.706% -4.296% -3.215%
algorithm_benches algorithm_sampling_multiple_known_length -2.619% -3.191% -2.024%
sampling sampling_single_unindexed_entities -2.573% -2.950% -2.182%
sampling count_and_sampling_single_unindexed_concrete_plus_derived_entiti -2.462% -2.789% -2.138%
sample_entity sample_entity_multi_property_indexed 100000 -2.260% -2.752% -1.849%
sample_entity sample_entity_multi_property_indexed 1000 -1.631% -2.178% -1.032%
sample_entity sample_entity_multi_property_indexed 10000 -1.504% -1.828% -1.152%
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
large_dataset bench_filter_unindexed_entity 5.117% 0.988% 9.044%
examples example-basic-infection -3.928% -8.862% -0.960%
counts single_property_indexed_entities -1.970% -4.330% 0.105%
large_dataset bench_query_population_property_entities 1.928% 0.820% 3.173%
sample_entity sample_entity_single_property_indexed 100000 1.738% 0.902% 2.540%
large_dataset bench_query_population_derived_property_entities 1.488% 0.652% 2.320%
sample_entity sample_entity_single_property_indexed 1000 -1.427% -2.096% -0.691%
large_dataset bench_query_population_multi_unindexed_entities -1.290% -2.166% -0.417%
indexing with_query_results_multiple_individually_indexed_properties_enti -1.210% -2.037% -0.437%
sampling sampling_multiple_unindexed_entities 1.187% 0.683% 1.703%
sampling sampling_single_l_reservoir_entities 1.052% 0.042% 1.814%
large_dataset bench_match_entity -0.959% -1.489% -0.440%
counts index_after_adding_entities -0.950% -1.810% -0.341%
sampling sampling_single_known_length_entities 0.903% 0.599% 1.208%
indexing query_people_count_multiple_individually_indexed_properties_enti 0.636% 0.169% 1.517%
counts concrete_plus_derived_unindexed_entities 0.610% -0.142% 1.321%
algorithm_benches algorithm_sampling_single_rand_reservoir -0.594% -1.160% -0.147%
large_dataset bench_filter_indexed_entity 0.583% -7.718% 9.891%
sampling sampling_multiple_known_length_entities -0.547% -3.185% 1.150%
large_dataset bench_query_population_indexed_property_entities 0.455% -0.462% 1.632%
sampling sampling_multiple_l_reservoir_entities -0.424% -0.761% -0.085%
counts reindex_after_adding_more_entities 0.338% 0.204% 0.473%
indexing with_query_results_indexed_multi-property_entities 0.274% -0.554% 1.395%
sample_entity sample_entity_single_property_unindexed 100000 -0.221% -0.491% 0.078%
indexing with_query_results_single_indexed_property_entities -0.177% -0.661% 0.341%
algorithm_benches algorithm_sampling_single_known_length 0.167% -0.154% 0.571%
indexing query_people_indexed_multi-property_entities -0.161% -0.520% 0.202%
examples example-births-deaths 0.128% -0.142% 0.391%
indexing query_people_count_indexed_multi-property_entities 0.122% -0.347% 0.568%
large_dataset bench_query_population_multi_indexed_entities 0.076% -0.366% 0.539%
algorithm_benches algorithm_sampling_multiple_l_reservoir 0.040% -0.338% 0.515%
algorithm_benches algorithm_sampling_single_l_reservoir -0.029% -0.148% 0.088%
Not Compared (no baseline yet)
Group Bench Reason
(none)

github-actions Bot added a commit that referenced this pull request May 19, 2026
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.

"Memory and CPU statistics are not available on your platform." on WASM

3 participants