Print command line usage help.
| 251 | |
| 252 | // Print command line usage help. |
| 253 | void PrintUsage() |
| 254 | { |
| 255 | fwprintf(stderr, L"PresentMon %hs\n", PRESENT_MON_VERSION); |
| 256 | |
| 257 | // Note: this array is parsed to generate README-ConsoleApplication.md, so do not deviate much |
| 258 | // from this formatting. Test any changes by running Tools\generate\readme\generate.cmd |
| 259 | wchar_t const* s[] = { |
| 260 | LR"(--Capture Target Options)", nullptr, |
| 261 | LR"(--process_name name)", LR"(Only record processes with the specified exe name. This argument can be repeated to capture multiple processes.)", |
| 262 | LR"(--exclude name)", LR"(Do not record processes with the specified exe name. This argument can be repeated to exclude multiple processes.)", |
| 263 | LR"(--process_id id)", LR"(Only record the process with the specified process ID.)", |
| 264 | LR"(--etl_file path)", LR"(Analyze an ETW trace log file instead of the actively running processes.)", |
| 265 | |
| 266 | LR"(--Output Options)", nullptr, |
| 267 | LR"(--output_file path)", LR"(Write CSV output to the specified path.)", |
| 268 | LR"(--output_stdout)", LR"(Write CSV output to STDOUT.)", |
| 269 | LR"(--multi_csv)", LR"(Create a separate CSV file for each captured process.)", |
| 270 | LR"(--no_csv)", LR"(Do not create any output CSV file.)", |
| 271 | LR"(--no_console_stats)", LR"(Do not display active swap chains and frame statistics in the console.)", |
| 272 | LR"(--qpc_time)", LR"(Output the CPU start time as a performance counter value.)", |
| 273 | LR"(--qpc_time_ms)", LR"(Output the CPU start time as a performance counter value converted to milliseconds.)", |
| 274 | LR"(--date_time)", LR"(Output the CPU start time as a date and time with nanosecond precision.)", |
| 275 | LR"(--exclude_dropped)", LR"(Exclude frames that were not displayed to the screen from the CSV output.)", |
| 276 | LR"(--v1_metrics)", LR"(Output a CSV using PresentMon 1.x metrics.)", |
| 277 | LR"(--v2_metrics)", LR"(Output a CSV using PresentMon 2.x metrics.)", |
| 278 | |
| 279 | LR"(--Recording Options)", nullptr, |
| 280 | LR"(--hotkey key)", LR"(Use the specified key press to start and stop recording. 'key' is of the form MODIFIER+KEY, e.g., "ALT+SHIFT+F11".)", |
| 281 | LR"(--delay seconds)", LR"(Wait for specified amount of time before starting to record. If using --hotkey, the delay occurs each time the recording key is pressed.)", |
| 282 | LR"(--timed seconds)", LR"(Stop recording after the specified amount of time.)", |
| 283 | LR"(--scroll_indicator)", LR"(Enable scroll lock while recording.)", |
| 284 | LR"(--track_gpu_video)", LR"(Track the video encode/decode portion of GPU work separately from other engines.)", |
| 285 | LR"(--no_track_display)", LR"(Do not track frames all the way to display.)", |
| 286 | LR"(--no_track_input)", LR"(Do not track keyboard/mouse clicks impacting each frame.)", |
| 287 | LR"(--no_track_gpu)", LR"(Do not track the duration of GPU work in each frame.)", |
| 288 | |
| 289 | LR"(--Execution Options)", nullptr, |
| 290 | LR"(--session_name name)", LR"(Use the specified session name instead of the default "PresentMon". This can be used to start multiple captures at the same time, as long as each is using a distinct, case-insensitive name.)", |
| 291 | LR"(--stop_existing_session)", LR"(If a trace session with the same name is already running, stop the existing session before starting a new session.)", |
| 292 | LR"(--terminate_existing_session)", LR"(If a trace session with the same name is already running, stop the existing session then exit.)", |
| 293 | LR"(--restart_as_admin)", LR"(If not running with elevated privilege, restart and request to be run as administrator.)", |
| 294 | LR"(--terminate_on_proc_exit)", LR"(Terminate PresentMon when all the target processes have exited.)", |
| 295 | LR"(--terminate_after_timed)", LR"(When using --timed, terminate PresentMon after the timed capture completes.)", |
| 296 | |
| 297 | LR"(--Beta Options)", nullptr, |
| 298 | LR"(--track_frame_type)", LR"(Track the type of each displayed frame; requires application and/or driver instrumentation using Intel-PresentMon provider.)", |
| 299 | LR"(--track_hw_measurements)", LR"(Tracks HW-measured latency and/or power data coming from a LMT and/or PCAT device.)", |
| 300 | LR"(--track_app_timing)", LR"(Track app times for each displayed frame; requires application and/or driver instrumentation using Intel-PresentMon provider.)", |
| 301 | LR"(--track_hybrid_present)", LR"(Tracks if the present is a hybrid present and is performing a cross adapter copy.)", |
| 302 | LR"(--track_pc_latency)", LR"(Track app timines for each displayed frame; requires application instrumentation using PC Latency events.)", |
| 303 | LR"(--set_circular_buffer_size)", LR"(Overide the default present event circular buffer size of 2048. Must be a power of 2.)", |
| 304 | }; |
| 305 | |
| 306 | // Layout |
| 307 | size_t argWidth = 0; |
| 308 | for (size_t i = 0; i < _countof(s); i += 2) { |
| 309 | auto arg = s[i]; |
| 310 | auto desc = s[i + 1]; |
no test coverage detected