-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
gh-138122: Refactor the CLI of profiling.sampling into subcommands #141813
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
base: main
Are you sure you want to change the base?
Conversation
0790c5b to
1fcfffc
Compare
1fcfffc to
db2ed3b
Compare
|
@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? |
|
CC @lkollar |
…nto subcommands
|
@hugovk if you have some time can you play with the CLI and tell be if you see any improvements we could do? |
savannahostrowski
left a comment
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.
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: |
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.
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) |
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.
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?
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.
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
Uh oh!
There was an error while loading. Please reload this page.