fix: use cargo build locked to remove noise from canbench measurements#327
Merged
fix: use cargo build locked to remove noise from canbench measurements#327
Conversation
|
|
|
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes dependency versions across the workspace and ensures benchmark builds use the lockfile for consistent measurements.
- Added
--lockedto all CanBenchbuild_cmdentries to remove noise from benchmark outputs - Migrated many crate dependencies to workspace-managed versions and bumped key versions (e.g.,
serde,ic-cdk,candid) - Reorganized per-example
Cargo.tomlfiles to use*.workspace = truewhere appropriate
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| fuzz/Cargo.toml | Bumped serde version and reordered dependencies |
| examples/src/vecs_and_strings/Cargo.toml | Enabled ic-cdk as a workspace dependency |
| examples/src/task_timer/Cargo.toml | Switched ic0 to workspace dependency and reordered entries |
| examples/src/quick_start/Cargo.toml | Converted ciborium and ic-cdk to workspace dependencies |
| examples/Cargo.toml | Updated workspace dependency versions (candid, ic-cdk, etc.) |
| benchmarks/vec/canbench.yml | Added --locked flag to build_cmd |
| benchmarks/memory_manager/canbench.yml | Added --locked flag to build_cmd |
| benchmarks/compare/canbench_results.yml | Updated instruction counts after re-running with --locked |
| benchmarks/compare/canbench.yml | Added --locked flag to build_cmd |
| benchmarks/btreemap/canbench.yml | Added --locked flag to build_cmd |
| benchmarks/Cargo.toml | Migrated maplit, serde, tiny-rng, and ic-cdk to workspace |
| Cargo.toml | Switched many deps (e.g., ic_principal, hex, proptest) to workspace and updated workspace versions |
This reverts commit a3f759a.
berestovskyy
approved these changes
May 28, 2025
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.
This PR uses
--lockedflag for building benchmarks to avoid 3rd party dependency noise.It also moves dependency versions into workspace section.