-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversation
f1a1e9f
to
839bcc2
Compare
/// 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>, | ||
|
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.
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
9b4b774
to
c992023
Compare
--profiler becomes --profile.
Add help verbiage for --profile.
c992023
to
9da618f
Compare
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.