Skip to content
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

Revamp profile handling CLI flags #318

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Conversation

fgsch
Copy link
Member

@fgsch fgsch commented Oct 6, 2023

This PR moves profiling to --profile, and replaces --profile-guest=[path] in favour of --profile=guest[,path], unifying the profiling options (and matching Wasmtime). Most of the code is adapted from Wasmtime.

While here I've removed some unncessary lifetimes and polished the code, mostly courtesy of clippy (the 2 last commits).

The PR is related to and was built on top of #316. It might make sense to review that one first.

Base automatically changed from fgsch/add-perfmap to main October 6, 2023 11:54
Comment on lines -51 to -55
/// Whether to profile the wasm guest. Takes an optional directory to save
/// per-request profiles to
#[arg(long, default_missing_value = "guest-profiles", num_args=0..=1, require_equals=true)]
profile_guest: Option<PathBuf>,

Copy link
Contributor

@JakeChampion JakeChampion Oct 6, 2023

Choose a reason for hiding this comment

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

Note: This would be a breaking change as we are removing a flag, we'd need to version accordingly -- I don't think we've made an intentional breaking change in this project before. We should mention the breaking change in the CHANGELOG.md file and if possible, write up a guide on what the migration path is for this feature

@fgsch fgsch force-pushed the fgsch/revamp-profiling-opts branch from 9b4b774 to c992023 Compare October 6, 2023 12:17
@fgsch fgsch mentioned this pull request Oct 6, 2023
lib/src/execute.rs Outdated Show resolved Hide resolved
@fgsch fgsch force-pushed the fgsch/revamp-profiling-opts branch from c992023 to 9da618f Compare October 6, 2023 21:57
@JakeChampion JakeChampion changed the title Revamp profile handling Revamp profile handling CLI flags Oct 9, 2023
@JakeChampion JakeChampion merged commit a72bc8b into main Oct 9, 2023
@JakeChampion JakeChampion deleted the fgsch/revamp-profiling-opts branch October 9, 2023 09:35
cmckendry pushed a commit to 1stdibs/Viceroy that referenced this pull request Feb 8, 2024
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.

2 participants