-
Notifications
You must be signed in to change notification settings - Fork 25
feat: enable cycle estimation and allocation exclusion by default #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,6 +113,30 @@ pub struct ExecAndRunSharedArgs { | |
| #[arg(long)] | ||
| pub base: Option<String>, | ||
|
|
||
| /// Enable Valgrind cycle estimation (--cycle-estimation) in simulation mode. | ||
| #[arg( | ||
| long, | ||
| env = "CODSPEED_CYCLE_ESTIMATION", | ||
| default_value_t = true, | ||
| default_missing_value = "true", | ||
| num_args = 0..=1, | ||
| require_equals = true, | ||
| action = clap::ArgAction::Set | ||
| )] | ||
| pub cycle_estimation: bool, | ||
|
|
||
| /// Exclude memory allocation time from simulation results. | ||
| #[arg( | ||
| long, | ||
| env = "CODSPEED_EXCLUDE_ALLOCATIONS", | ||
| default_value_t = true, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Defaulting Knowledge Base Used: Upload flow Prompt To Fix With AIThis is a comment left during a code review.
Path: src/cli/shared.rs
Line: 132
Comment:
**Upload Hash Changes Globally**
Defaulting `exclude_allocations` to `true` makes `Runner.excludeAllocations` serialize for every run, so the upload metadata hash changes for the same benchmark invocation even when users did not opt in. The upload metadata contract treats this field as an opt-in serialized signal, so this needs a metadata-version migration or another compatibility path to avoid mixing old and new hash semantics.
**Knowledge Base Used:** [Upload flow](https://app.greptile.com/codspeed/-/custom-context/knowledge-base/codspeedhq/codspeed/-/docs/upload.md)
How can I resolve this? If you propose a fix, please make it concise. |
||
| default_missing_value = "true", | ||
| num_args = 0..=1, | ||
| require_equals = true, | ||
| action = clap::ArgAction::Set | ||
| )] | ||
| pub exclude_allocations: bool, | ||
|
Comment on lines
+129
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Existing jobs that still pass Knowledge Base Used: Prompt To Fix With AIThis is a comment left during a code review.
Path: src/cli/shared.rs
Line: 129-138
Comment:
**Old Allocation Override Ignored**
Existing jobs that still pass `--experimental-exclude-allocations` now fail argument parsing because the old field was removed without an alias or hidden compatibility option. Existing jobs that set `CODSPEED_EXPERIMENTAL_EXCLUDE_ALLOCATIONS=false` are silently changed to the new default, so uploads send `excludeAllocations: true` even though the job asked to keep allocation time included.
**Knowledge Base Used:**
- [CLI Commands](https://app.greptile.com/codspeed/-/custom-context/knowledge-base/codspeedhq/codspeed/-/docs/cli-commands.md)
- [Upload flow](https://app.greptile.com/codspeed/-/custom-context/knowledge-base/codspeedhq/codspeed/-/docs/upload.md)
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
| #[command(flatten)] | ||
| pub profiler_run_args: ProfilerRunArgs, | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing jobs that still pass
--experimental-cycle-estimationnow fail argument parsing because the old field was removed without an alias or hidden compatibility option. Existing jobs that setCODSPEED_EXPERIMENTAL_CYCLE_ESTIMATION=falseare worse: the env var is ignored and the new default enables cycle estimation anyway.Knowledge Base Used: CLI Commands
Prompt To Fix With AI