Skip to content

Add --dont-collect and --collect-only flags to customize which data to collect#303

Merged
CongkaiTan merged 1 commit into
aws:mainfrom
CongkaiTan:main
Aug 22, 2025
Merged

Add --dont-collect and --collect-only flags to customize which data to collect#303
CongkaiTan merged 1 commit into
aws:mainfrom
CongkaiTan:main

Conversation

@CongkaiTan

@CongkaiTan CongkaiTan commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Issue

Mirroring internal CR 212108965

Description

  • added the --dont-collect and --collect-only flags to allow users to select what performance data to select.
  • reformatted the help menu by setting help_heading for each flag, which groups the flags into sections in the help menu
  • remodeled the cases when data is not available:
    • an error is thrown when invoking get_data method on an unavailable data
    • upstream is expected to check if data is available before calling get_data
  • added Typescript function handleNoData() that inserts the "No data collected" message into the report, if the run data is empty
  • Revamped the help menu and README (for the new README, see https://github.com/CongkaiTan/aperf/blob/53d9684d58df0b844b236be89e6ebfb0e944e9b6/README.md)

Below is the new aperf record -h output:

dev-dsk-congkai-2a-8e335c45 % aperf record -h
Collect performance data

Usage: aperf record [OPTIONS]

Options:
  -h, --help     Print help
  -V, --version  Print version

Basic Options:
  -r, --run-name <RUN_NAME>  Name of the run
  -i, --interval <INTERVAL>  Interval (in seconds) at which performance data is to be collected [default: 1]
  -p, --period <PERIOD>      Time (in seconds) for which the performance data is to be collected [default: 10]
  -v, --verbose...           Show debug messages. Use -vv for more verbose messages
  -t, --tmp-dir <TMP_DIR>    Temporary directory for intermediate files [default: /tmp]

Data Selection:
      --dont-collect <Data Name>,<Data Name>,...
          The list of performance data to skip collection. Cannot be used with --collect_only [possible values: cpu_utilization, vmstat, disk_stats, system_info, kernel_config, interrupts, sysctl, perf_stat, processes, meminfo, netstat]
      --collect-only <Data Name>,<Data Name>,...
          The list of performance data to be collected - the others will not be collected. Cannot be used with --dont_collect [possible values: cpu_utilization, vmstat, disk_stats, system_info, kernel_config, interrupts, sysctl, perf_stat, processes, meminfo, netstat]

Perf Profiling:
      --profile                          Gather profiling data using 'perf' binary
  -F, --perf-frequency <PERF_FREQUENCY>  Frequency for perf profiling (Hz) [default: 99]

Java Profiling:
      --profile-java [<PID/Name>,<PID/Name>,...,<PID/Name>]
          Profile JVMs using async-profiler. Specify args using comma separated values. Profiles all JVMs if no args are provided

PMU Options:
      --pmu-config <PMU_CONFIG>  Custom PMU config file to use

WE RECOMMEND TO ALWAYS COLLECT AS MUCH DATA AS POSSIBLE FOR PERFORMANCE DEBUGGING, UNLESS YOU ARE SURE SOME DATA CAN BE EXCLUDED.

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

@CongkaiTan CongkaiTan requested a review from a team as a code owner August 22, 2025 20:04
@CongkaiTan CongkaiTan merged commit 0a9ff16 into aws:main Aug 22, 2025
6 checks 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.

3 participants