-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(hydro_deploy, hydro_lang): make profiling runnable on macOS #1739
base: main
Are you sure you want to change the base?
Conversation
As long as the user runs `sudo dtrace` shortly before launching a Hydro deployment with profiling (so that sudo inherits the recent permission grant), things work end-to-end. We don't currently support measuring user vs system time on non-Linux so stub out that logic with dummy values.
Deploying hydroflow with
|
Latest commit: |
11df1a2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://c203ba47.hydroflow.pages.dev |
Branch Preview URL: | https://pr1739.hydroflow.pages.dev |
{ | ||
println!( | ||
"{} Total {:.4}%, User {:.4}%, System {:.4}%", | ||
CPU_USAGE_PREFIX, 100.0, 100.0, 0.0 |
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.
Seems misleading?? Shouldn't we just print NaN or something?
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.
Fair will fix.
let mut command = Command::new("dtrace"); | ||
let mut command = Command::new("sudo"); | ||
command | ||
.arg("dtrace") |
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.
Isn't it just possible to run hydro_deploy as sudo?
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.
That unfortunately messes up the target/
directory with a bunch of root-owned files. This restricts root to only launching the binary.
As long as the user runs
sudo dtrace
shortly before launching a Hydro deployment with profiling (so that sudo inherits the recent permission grant), things work end-to-end. We don't currently support measuring user vs system time on non-Linux so stub out that logic with dummy values.