Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 21, 2025

@pablogsal
Copy link
Member Author

@savannahostrowski I have reformulated the CLI to break it into sub commands. Could you play with this a bit and tell me what you think?

@pablogsal
Copy link
Member Author

CC @lkollar

@pablogsal
Copy link
Member Author

@hugovk if you have some time can you play with the CLI and tell be if you see any improvements we could do?

Copy link
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

This refactoring makes the UX so much less intimidating off the jump IMO. I really like what it does for help tbh. Makes things a bit more intuitive!

One suggestion around how we can clean up examples in the help but otherwise, LGTM!

attach Attach to and profile a running process
live Interactive TUI profiler (top-like interface)
Examples:
Copy link
Member

Choose a reason for hiding this comment

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

With subcommands, it'd be nice to pull some of these examples into the subcommand help. I'd suggest maybe keeping one example for each run/attach/live in general help and then moving all the others into the right contextual command.

I think that should help with readability of all the examples here, while still giving folks inline guidance.

Commands:
run Run and profile a script or module
attach Attach to and profile a running process
live Interactive TUI profiler (top-like interface)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm maybe live should be a --live flag on run and attach since itself can run and attach? Isn't it more like an output type?

Copy link
Member Author

@pablogsal pablogsal Nov 22, 2025

Choose a reason for hiding this comment

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

Ah good point indeed! Yeah I think this makes sense. I wanted to give this a bit more protagonism but it's true that the model doesn't really match

@hugovk hugovk changed the title gh-138122: Refactor the CLI of profile.sampling into subcommands gh-138122: Refactor the CLI of profiling.sampling into subcommands Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants