bench(compaction): bootstrap local Criterion harness + versioned JSON benchmark artifacts#585
Open
bench(compaction): bootstrap local Criterion harness + versioned JSON benchmark artifacts#585
Conversation
ethe
requested changes
Feb 18, 2026
Member
ethe
left a comment
There was a problem hiding this comment.
The overall direction looks good. The benchmark structure and versioned artifact output are useful. I do see one stability issue that should be fixed before merge.
|
|
||
| impl ResolvedConfig { | ||
| pub(crate) fn from_env() -> Result<Self, BenchError> { | ||
| let ingest_batches = env_usize( |
Member
There was a problem hiding this comment.
A valid config can panic during scenario setup. TONBO_COMPACTION_BENCH_INGEST_BATCHES is parsed in here, but there is no > 0 validation. Later, latest_version_summary errors when list_versions(1) is empty (benches/ compaction/common.rs:429), and that bubbles into a panic at benches/compaction_local.rs:27.
Collaborator
Author
There was a problem hiding this comment.
- Added explicit > 0 validation for
TONBO_COMPACTION_BENCH_INGEST_BATCHESinbenches/compaction/common.rs:102, so invalid config fails fast withBenchError::InvalidEnv. - Kept the downstream guard in latest_version_summary (
benches/compaction/common.rs:435) as defense-in-depth for unexpected empty version lists.
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.
Closes #584
Summary
This PR delivers a baseline compaction benchmark infrastructure for local filesystem runs.
What changed
compaction_local.read_baselineandread_post_compaction.target/tonbo-bench/per run.schema_version, resolved config, scenario id/name, throughput/latency summary.benches/compaction/common.rs(shared logic) andbenches/compaction_local.rs(scenario wiring).README.mdwith run commands + pointers to benchmark source files; removeddocs/benchmarks/compaction-local.md.Scope guarantees
TONBO_COMPACTION_BENCH_*).How to run locally
Example artifact
target/tonbo-bench/compaction_local-<run_id>.jsonschema_version,config,scenarios[]