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

feat(hydro_deploy, hydro_lang): make profiling runnable on macOS #1739

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shadaj
Copy link
Member

@shadaj shadaj commented Feb 22, 2025

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.

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.
Copy link

cloudflare-workers-and-pages bot commented Feb 22, 2025

Deploying hydroflow with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11df1a2
Status: ✅  Deploy successful!
Preview URL: https://c203ba47.hydroflow.pages.dev
Branch Preview URL: https://pr1739.hydroflow.pages.dev

View logs

@shadaj shadaj requested a review from MingweiSamuel February 22, 2025 23:37
{
println!(
"{} Total {:.4}%, User {:.4}%, System {:.4}%",
CPU_USAGE_PREFIX, 100.0, 100.0, 0.0
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair will fix.

Comment on lines -165 to +167
let mut command = Command::new("dtrace");
let mut command = Command::new("sudo");
command
.arg("dtrace")
Copy link
Member

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?

Copy link
Member Author

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.

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