refactor(bench): clean up BenchRunner API and add tracing instrumentation#3962
Merged
Conversation
2f49bca to
ea8c6c4
Compare
…tion - Remove dead `_no_deterministic: bool` parameter from `BenchRunner::new`; callers already apply deterministic overrides to the provider before construction via `apply_deterministic_overrides` (closes #3952) - Extract shared `filter_scenarios` helper to eliminate duplicated scenario-filter validation and skip logic in `run_dataset` and `run_dataset_with_env_factory` (closes #3953) - Add `tracing::info_span!` to `run_dataset`, `run_dataset_with_env_factory`, and `run_one_with_executor` so bench runs are visible in Perfetto/Jaeger traces (closes #3948)
…BenchRunner::new cleanup
ea8c6c4 to
52de174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_no_deterministic: boolparameter fromBenchRunner::new— deterministic overrides are applied to the provider before construction viaapply_deterministic_overrides, so the parameter was unused at runtime (closes refactor(bench): BenchRunner::new takes unused _no_deterministic: bool — dead parameter in public API #3952)filter_scenarioshelper to eliminate duplicated scenario-filter validation and skip-guard logic inrun_datasetandrun_dataset_with_env_factory(closes refactor(bench): run_dataset and run_dataset_with_env_factory duplicate scenario-filter and skip logic #3953)tracing::info_span!torun_dataset,run_dataset_with_env_factory, andrun_one_with_executorso bench runs produce spans (bench.run_dataset,bench.run_dataset_with_env_factory,bench.scenario,bench.run_one) visible in Perfetto and Jaeger traces (closes perf(bench): BenchRunner::run_dataset and run_one_with_executor lack tracing instrumentation #3948)Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— cleancargo nextest run --workspace --lib --bins— 9426 passedRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— clean