Skip to content

Conversation

@yugesk
Copy link
Contributor

@yugesk yugesk commented Jun 13, 2025

Issue #, if available:
Default 99 mayn't be needed for larger runs so giving an option helps.

Description of changes:
Enable an option to overide default 99

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@yugesk yugesk requested a review from a team as a code owner June 13, 2025 17:06

`--profile` gather profiling data using the 'perf' binary

`-F, --perf-frequency` frequency for perf profiling in Hz (default 99)
Copy link

Choose a reason for hiding this comment

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

what happens if I use this without --profile option? will it error out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it will be a no op, doesn't fail.

Copy link
Contributor Author

@yugesk yugesk Jun 13, 2025

Choose a reason for hiding this comment

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

ubuntu@ip-172-31-85-220:~/aperf$ ./target/debug/aperf record -F 33
[2025-06-13T18:09:23Z INFO aperf] No run-name given. Using aperf_2025-06-13_18_09_23
[2025-06-13T18:09:23Z INFO aperf::record] Starting Data collection...
[2025-06-13T18:09:23Z INFO aperf::record] Preparing data collectors...
[2025-06-13T18:09:23Z WARN aperf::data::perf_stat] Event multiplexing may result in bad PMU data.
[2025-06-13T18:09:24Z INFO aperf::record] Collecting data...
[2025-06-13T18:09:35Z INFO aperf::record] Data collection complete.
[2025-06-13T18:09:35Z INFO aperf] Data collected in ./aperf_2025-06-13_18_09_23/, archived in ./aperf_2025-06-13_18_09_23.tar.gz

ubuntu@ip-172-31-85-220:~/aperf$ ./target/debug/aperf record --profile -F 33
[2025-06-13T18:09:48Z INFO aperf] No run-name given. Using aperf_2025-06-13_18_09_48
[2025-06-13T18:09:48Z INFO aperf::record] Starting Data collection...
[2025-06-13T18:09:48Z INFO aperf::record] Preparing data collectors...
[2025-06-13T18:09:48Z WARN aperf::data::perf_stat] Event multiplexing may result in bad PMU data.
[2025-06-13T18:09:48Z INFO aperf::record] Collecting data...
[2025-06-13T18:10:00Z INFO aperf::data::flamegraphs] Creating flamegraph...
[2025-06-13T18:10:01Z INFO aperf::record] Data collection complete.
[2025-06-13T18:10:07Z INFO aperf] Data collected in ./aperf_2025-06-13_18_09_48/, archived in ./aperf_2025-06-13_18_09_48.tar.gz

Copy link

Choose a reason for hiding this comment

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

ok. can we add that in README to make it clear? something like below

-F, --perf-frequency: Sets the frequency for perf profiling in Hz (default 99). Only takes effect when used with --profile, otherwise ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its a perf profiling param, do we need to mention it has to be used with --profile again?

@yugesk yugesk merged commit cc97809 into main Jun 13, 2025
6 checks passed
@yugesk yugesk deleted the perf-frequency branch June 13, 2025 18:30
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.

3 participants