The PresentMon/ directory contains source for a standalone console application that uses the
PresentMon SDK to capture and analyze graphics applications, outputting data to the console and/or
CSV file(s).
PresentMon/ 目录包含了一个独立控制台应用程序的源代码,该程序使用了
PresentMon SDK 用于捕获和分析图形应用程序,将数据输出到控制台和/或 CSV 文件。
A binary of the console application is provided in the release, e.g.:
PresentMon-2.3.0-x64.exe.
在发布版本中提供了控制台应用程序的二进制文件,例如:
PresentMon-2.3.0-x64.exe
Capture Target Options 捕获目标选项 | |
---|---|
--process_name name |
Only record processes with the specified exe name. This argument can be repeated to capture multiple processes. 仅记录具有指定 exe 名称的进程。该参数可重复使用以捕获多个进程。 |
--exclude name |
Do not record processes with the specified exe name. This argument can be repeated to exclude multiple processes. 不记录具有指定 exe 名称的进程。此参数可重复使用以排除多个进程。 |
--process_id id |
Only record the process with the specified process ID. 仅记录具有指定进程 ID 的进程。 |
--etl_file path |
Analyze an ETW trace log file instead of the actively running processes. 分析 ETW 跟踪日志文件而非正在运行的进程。 |
Output Options 输出选项 | |
---|---|
--output_file path |
Write CSV output to the specified path. 将 CSV 输出写入指定路径。 |
--output_stdout |
Write CSV output to STDOUT. 将 CSV 输出写入标准输出(STDOUT)。 |
--multi_csv |
Create a separate CSV file for each captured process. 为每个捕获的进程创建单独的 CSV 文件。 |
--no_csv |
Do not create any output CSV file. 不生成任何 CSV 输出文件。 |
--no_console_stats |
Do not display active swap chains and frame statistics in the console. 不在控制台中显示活动的交换链和帧统计信息。 |
--qpc_time |
Output the CPU start time as a performance counter value. 输出 CPU 起始时间作为性能计数器值。 |
--qpc_time_ms |
Output the CPU start time as a performance counter value converted to milliseconds. 输出 CPU 起始时间作为性能计数器值并转换为毫秒。 |
--date_time |
Output the CPU start time as a date and time with nanosecond precision. 以日期和时间格式输出 CPU 起始时间,精确到纳秒。 |
--exclude_dropped |
Exclude frames that were not displayed to the screen from the CSV output. 从 CSV 输出中排除未显示在屏幕上的帧。 |
--v1_metrics |
Output a CSV using PresentMon 1.x metrics. 输出使用 PresentMon 1.x 指标的 CSV 文件。 |
Recording Options 录制选项 | |
---|---|
--hotkey key |
Use the specified key press to start and stop recording. 'key' is of the form MODIFIER+KEY, e.g., "ALT+SHIFT+F11". 使用指定按键组合开始和停止记录。'key'格式为 MODIFIER+KEY,例如"ALT+SHIFT+F11"。 |
--delay seconds |
Wait for specified amount of time before starting to record. If using --hotkey, the delay occurs each time the recording key is pressed. 在开始记录前等待指定的时间。如果使用 --hotkey 参数,每次按下记录键时都会执行该延迟。 |
--timed seconds |
Stop recording after the specified amount of time. 在指定时间后停止录制。 |
--scroll_indicator |
Enable scroll lock while recording. 录制时启用滚动锁定。 |
--track_gpu_video |
Track the video encode/decode portion of GPU work separately from other engines. 单独追踪 GPU 工作中视频编码/解码部分,与其他引擎分开统计。 |
--no_track_display |
Do not track frames all the way to display. 不跟踪帧直到显示。 |
--no_track_input |
Do not track keyboard/mouse clicks impacting each frame. 不追踪影响每帧的键盘/鼠标点击。 |
--no_track_gpu |
Do not track the duration of GPU work in each frame. 不追踪每帧中 GPU 工作的持续时间。 |
Execution Options 执行选项 | |
---|---|
--session_name name |
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. 使用指定的会话名称替代默认的"PresentMon"。这可用于同时启动多个捕获,只要每个会话使用不同的名称(不区分大小写)。 |
--stop_existing_session |
If a trace session with the same name is already running, stop the existing session before starting a new session. 如果已存在同名跟踪会话,请先停止现有会话再启动新会话。 |
--terminate_existing_session |
If a trace session with the same name is already running, stop the existing session then exit. 如果已存在同名跟踪会话正在运行,则停止现有会话后退出。 |
--restart_as_admin |
If not running with elevated privilege, restart and request to be run as administrator. 如果没有以管理员权限运行,请重新启动并以管理员身份运行。 |
--terminate_on_proc_exit |
Terminate PresentMon when all the target processes have exited. 在所有目标进程退出时终止 PresentMon。 |
--terminate_after_timed |
When using --timed, terminate PresentMon after the timed capture completes. 使用 --timed 参数时,在定时捕获完成后终止 PresentMon。 |
Beta Options 测试版选项 | |
---|---|
--track_frame_type |
Track the type of each displayed frame; requires application and/or driver instrumentation using Intel-PresentMon provider. 跟踪每个显示帧的类型;需要使用 Intel-PresentMon 提供程序对应用程序和/或驱动程序进行检测。 |
--track_hw_measurements |
Tracks HW-measured latency and/or power data coming from a LMT and/or PCAT device. 追踪来自 LMT 和/或 PCAT 设备的硬件测量延迟和/或功耗数据。 |
--track_app_timing |
Track app timines for each displayed frame; requires application and/or driver instrumentation using Intel-PresentMon provider. 跟踪每个显示帧的应用程序时间;需要使用 Intel-PresentMon 提供程序对应用程序和/或驱动程序进行检测。 |
By default, PresentMon creates a CSV file named "PresentMon-<Time>.csv", where "<Time>" is the
creation time in ISO 8601 format. To specify your own output location, use the --output_file PATH
command line argument.
默认情况下,PresentMon 会生成一个名为"PresentMon-<Time>.csv"的 CSV 文件,其中"<Time>"是 ISO 8601 格式的创建时间。若要指定自定义输出路径,请使用 --output_file PATH
参数
命令行参数。
If --multi_csv
is used, then one CSV is created for each process captured and
"-<ProcessName>-<ProcessId>" is appended to the file name.
如果使用了 --multi_csv
参数,则会为每个捕获的进程创建一个 CSV 文件,并在文件名后追加"--"后缀。
If --hotkey
is used, then one CSV is created for each time recording is started and "-<Index>" is
appended to the file name.
如果使用了 --hotkey
参数,则每次开始录制时都会创建一个 CSV 文件,并在文件名后追加"-"符号。
Each row of the CSV represents a frame that an application rendered and presented to the system for
display, and each column contains a particular metric value associated with that frame. All time values
are in milliseconds.
CSV 文件的每一行代表应用程序渲染并提交给系统显示的帧,每列包含与该帧相关的特定指标值。所有时间值均以毫秒为单位。
Default metrics include:
默认指标包括:
Column Header 列标题 | Description 描述 |
---|---|
Application 应用程序 | The name of the process that generated the frame. 生成该帧的进程名称。 |
ProcessID 进程 ID | The process ID of the process that generated the frame. 生成该帧的进程 ID。 |
SwapChainAddress 交换链地址 | The address of the swap chain used to present the frame. 用于呈现帧的交换链地址。 |
PresentRuntime | The API used to present the frame. 用于呈现帧的 API。 |
SyncInterval 同步间隔 | The sync interval provided by the application when presenting the frame. Note: this value may be modified later by the driver, e.g., based on control panel overrides. 应用程序在呈现帧时提供的同步间隔。注意:此值可能会被驱动程序后续修改,例如基于控制面板的覆盖设置。 |
PresentFlags | The present flags provided by the application when presenting the frame. 应用程序在呈现帧时提供的当前标志。 |
AllowsTearing 允许撕裂 | 1 if partial frames might be displayed on the screen, or 0 if only full frames are displayed. 1 表示屏幕上可能显示部分帧,0 表示仅显示完整帧。 |
PresentMode 呈现模式 | The presentation mode used by the system for this frame. See the table below for more details. 系统为此帧使用的呈现模式。详情请参阅下表。 |
FrameType 帧类型 | Whether the frame was rendered by the application or generated by a driver/SDK. 该帧是由应用程序渲染还是由驱动程序/SDK 生成。 |
CPUStartTime CPU 开始时间 (CPUStartQPC) (CPUStartQPCTime) (CPUStartDateTime) (CPU 开始日期时间) |
The time the CPU started working on this frame. By default, this is the time since recording started unless: CPU 开始处理该帧的时间。默认情况下,这是自记录开始以来的时间,除非: • When --qpc_time is used, the value is a performance counter value and the column is named CPUStartQPC.• 当使用 --qpc_time 时,该值为一个 性能计数器值 ,且列名称为 CPUStartQPC。• When --qpc_time_ms is used, the value is the query performance counter value converted to milliseconds and the column is named CPUStartQPCTime.• 当使用 --qpc_time_ms 时,该值为查询性能计数器值转换为毫秒后的结果,列名标记为 CPUStartQPCTime。• When --date_time is used, the value is a date and the column is named CPUStartDateTime.• 当使用 --date_time 时,该值为日期格式,列名标记为 CPUStartDateTime。 |
FrameTime 帧时间 | How long it took from the start of this frame until the CPU started working on the next frame. 从当前帧开始到 CPU 开始处理下一帧所花费的时间。 |
CPUBusy CPU 繁忙 | How long the CPU spent working on this frame before presenting it. CPU 在呈现该帧之前处理该帧所花费的时间。 |
CPUWait CPU 等待 | How long the CPU spent waiting before starting the next frame. CPU 在开始下一帧之前等待的时间长度。 |
GPULatency GPU 延迟 | How long it took from the start of this frame until the GPU started working on it. 从本帧开始到 GPU 开始处理该帧所花费的时间。 |
GPUTime GPU 时间 | The total amount of time that GPU was working on this frame. GPU 处理该帧所用的总时间。 |
GPUBusy GPU 占用率 | How long the GPU was actively working on this frame (i.e., the time during which at least one GPU engine is executing work from the target process). GPU 在此帧上实际工作的时间(即至少有一个 GPU 引擎在执行目标进程工作的时间段)。 |
GPUWait GPU 等待 | How long the GPU was idle while working on this frame. GPU 在处理此帧时的空闲时长。 |
VideoBusy 视频繁忙 | How long the GPU video encode/decode engines were actively working on this frame. GPU 视频编码/解码引擎在此帧上活跃工作的时间长度。 |
DisplayLatency 显示延迟 | How long it took from the start of this frame until the frame was displayed on the screen. 从本帧开始到显示在屏幕上所花费的时间。 |
DisplayedTime 显示时间 | How long the frame was displayed on the screen, or 'NA' if the frame was not displayed. 该帧在屏幕上显示的时长,若未显示则为'NA'。 |
AnimationError 动画错误 | The difference between the previous frame's CPU delta and display delta. 上一帧的 CPU 时间差与显示时间差之间的差异。 |
AnimationTime 动画时间 | The time the CPU started animation work on this frame. CPU 开始处理此帧动画的时间。 |
ClickToPhotonLatency 点击到光子延迟 | How long it took from the earliest mouse click that contributed to this frame until this frame was displayed. When supported HW measuring devices are not available, this is the software-visible subset of the full click-to-photon latency and doesn't include: 从最早影响本帧的鼠标点击到本帧显示所花费的时间。当不支持硬件测量设备时,这是完整点击到光子延迟中软件可见的部分子集,不包括: • time spent processing input in the keyboard/controller hardware or drivers (typically a fixed additional overhead), • 键盘/控制器硬件或驱动处理输入所耗费的时间(通常为固定的额外开销) • time spent processing the output in the display hardware or drivers (typically a fixed additional overhead), and • 显示硬件或驱动程序中处理输出所花费的时间(通常是固定的额外开销),以及 • a combination of display blanking interval and scan time (which varies, depending on timing and tearing). • 显示器消隐间隔与扫描时间(根据时序和撕裂情况而变化)的组合 |
AllInputToPhotonLatency 所有输入到光子延迟 | How long it took from the earliest keyboard or mouse interaction that contributed to this frame until this frame was displayed. 从最早影响此帧的键盘或鼠标交互开始,到该帧显示完成所花费的时间。 |
InstrumentedLatency 仪表化延迟 | Instrumented Frame Start To Display Latency 仪表化帧开始到显示的延迟 |
Some metrics are enabled or disabled depending on the command line options:
部分指标会根据命令行选项启用或禁用:
Command line option 命令行选项 | Enabled metrics 启用的指标 | Disabled metrics 已禁用的指标 |
---|---|---|
--track_frame_type |
FrameType 帧类型 | |
--track_gpu_video |
VideoBusy 视频繁忙 | |
--no_track_gpu |
GPULatency GPU 延迟 GPUBusy GPU 占用率 GPUWait GPU 等待 VideoBusy 视频繁忙 |
|
--no_track_input |
ClickToPhotonLatency 点击到光子延迟 | |
--no_track_display (requires --no_track_gpu and --no_track_input as well)(需要同时使用 --no_track_gpu 和 --no_track_input 参数) |
AllowsTearing 允许撕裂 PresentMode 呈现模式 DisplayLatency 显示延迟 DisplayedTime 显示时间 |
|
--v1_metrics |
Most of the above metrics. See a 1.x README.md for details on Presentmon 1.x metrics. 上述大部分指标。有关 Presentmon 1.x 指标的详细信息,请参阅 1.x README.md。 |
The following values are used in the PresentMode column:
PresentMode 列中使用的值如下:
PresentMode 呈现模式 | Description 描述 |
---|---|
Hardware: Legacy Flip 硬件:传统翻转模式 | Indicates the app took ownership of the screen, and is swapping the displayed surface every frame. 表示应用程序已接管屏幕控制权,并正在逐帧切换显示画面。 |
Hardware: Legacy Copy to front buffer 硬件:传统复制到前缓冲区 |
Indicates the app took ownership of the screen, and is copying new contents to an already-on-screen surface every frame. 表示应用程序已接管屏幕控制权,并正在将新内容逐帧复制到已显示的屏幕表面上。 |
Hardware: Independent Flip 硬件:独立翻转 |
Indicates the app does not have ownership of the screen, but is still swapping the displayed surface every frame. 表示该应用不拥有屏幕所有权,但仍会每帧交换显示的表面。 |
Composed: Flip 合成:翻转 | Indicates the app is windowed, is using "flip model" swapchains, and is sharing its surfaces with DWM to be composed. 表示该应用为窗口化模式,使用 "翻转模型"交换链 ,并与桌面窗口管理器(DWM)共享其表面进行合成。 |
Hardware Composed: Independent Flip 硬件组合:独立翻转 |
Indicates the app is using "flip model" swapchains, and has been granted a hardware overlay plane. 表示该应用正在使用 "翻转模型"交换链 ,并且已获得硬件覆盖平面的授权。 |
Composed: Copy with GPU GDI 由 GPU GDI 组合:复制 |
Indicates the app is windowed, and is copying contents into a surface that's shared with GDI. 表示该应用为窗口化运行,并正在将内容复制到与 GDI 共享的图面中。 |
Composed: Copy with CPU GDI 由 CPU GDI 合成的拷贝 |
Indicates the app is windowed, and is copying contents into a dedicated DirectX window surface. GDI contents are stored separately, and are composed together with DX contents by the DWM. 表示该应用为窗口模式,正在将内容复制到专用的 DirectX 窗口表面。GDI 内容单独存储,并通过 DWM 与 DX 内容组合在一起。 |
For more information on the performance implications of these, see:
有关这些性能影响的更多信息,请参阅: