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

MSEOSKERN-4482: Profiling Agent Command Line Arguments #1

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

gmarler
Copy link
Collaborator

@gmarler gmarler commented Mar 20, 2024

Expand or improve our current Clap 4 Derive command line arguments:

  • Specify TIDs to profile - in addition to the PIDs we select
    • These can be outside/beyond the PIDs that have been selected, if any
  • Accept per-CPU raw stack sampling frequency in Hz
    • Defaults to 19 Hz
    • Limit to range 1 Hz to 1009 Hz
    • Ensure selected number is a prime number
  • Duration of the profiling agent run in seconds
    • Defaults to forever, or 'continuous'
    • Thus, we eliminate the continuous option
  • The name of the file in which the emitted flamegraph SVG will be placed
    • Defaults to "flame.svg"
  • Need to add an option that expresses at which interval or rate "collections" occur

@gmarler gmarler requested a review from javierhonduco March 20, 2024 14:23
Copy link
Owner

@javierhonduco javierhonduco left a comment

Choose a reason for hiding this comment

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

LGTM! Just left some minor comments. Let's try to remove the Box::leak though 😄

.gitignore Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/profiler.rs Show resolved Hide resolved
- Add --duration and --sample_freq options
- Check range/primeness of --sample_freq option
- Added --flamegraph_file option
- Added #cfg[test] block for main.rs
- Add version locks in Cargo.toml
- Added docs/help for remaining arguments
- Add rstest crate; parameterize tests for sample-freq option
- Add doc/help for --filter-logs arg
- Use strings feature of clap crate to handle --duration option default properly
@gmarler gmarler merged commit ac5b686 into javierhonduco:main Mar 25, 2024
1 check passed
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