> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PIXReportCounter

> PIXReportCounter

# PIXReportCounter

在 PIX 的**系统监视器**视图中显示一个用户定义的计数器。

## 语法

```cpp theme={null}
void PIXReportCounter(  
         PCWSTR name,  
         float value  
)  
```

### 参数

*name*   \_In\_\
类型：PCWSTR

要作为字符串显示的名称。

*value*   \
类型：float

要显示的值。这可以是持续时间、百分比、计数或浮点值。请考虑将值映射到 0 到 100 的范围，因为此范围在 PIX UI 中最为清晰。

### 返回值

类型：void

## 备注

`PIXReportCounter` 可用于随时间跟踪游戏的某个方面。在运行时，每次调用具有相同 *name* 的函数时，*value* 参数就会被绘制以在 PIX **系统监视器**视图中创建时间线图。这可用于跟踪诸如屏幕上的敌人、视图中的对象或可能影响捕获性能的任何其他内容。

## 要求

**头文件：** pix3.h

**库：** pixevt.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[PIX 计数器（NDA 主题）](/tools/tools-console/pix/gpu/pix-counters)\
[PIX3](/reference/tools/pix3/pix3_members)\
[PIX（NDA 主题）](/tools/tools-console/pix/pix)


## Related topics

- [PIX3](/zh-CN/reference/tools/pix3/pix3_members.md)
- [使用 PIX 进行可持续性分析](/zh-CN/build/game-principles/sustainability/sustainability-pix-guide.md)
- [GAMEPAD_REPORT structure](/zh-CN/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md)
- [GAMEPAD_REPORT_EX](/zh-CN/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md)
- [PFCatalogReportItemRequest](/zh-CN/services/playfab/api-references/c/pfcatalogtypes/structs/pfcatalogreportitemrequest.md)
