Possible bug in `DynamicQuerySample` / `AddGpuMetric`
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 80/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
该改动是在 DynamicQuerySample 的 AddGpuMetric() 函数中的一行编辑:第四个 Presented FPS 元素推送 PM_STAT_PERCENTILE_90,而 print 语句将其标记为 99%,因此该 stat 应改为 PM_STAT_PERCENTILE_99。对照 DynamicQuerySample() 中已经正确使用 PM_STAT_PERCENTILE_99 的 FixedQueryElement fps99 进行交叉检查。当 elements[4] 与其 "Presented FPS 99%" 标签匹配,且示例仍能构建并运行时,即完成。由于该 issue 是以问题形式提出的,开始前可能需要维护者的确认。
由索引模型根据 Issue 内容生成。
描述
Possible bug in DynamicQuerySample / AddGpuMetric
I noticed what appears to be a typo in the AddGpuMetric() function of the Dynamic Query sample.
The code adds the fourth FPS percentile query as:
elements.push_back(PM_QUERY_ELEMENT{
.metric = PM_METRIC_PRESENTED_FPS,
.stat = PM_STAT_PERCENTILE_90,
.deviceId = 0,
.arrayIndex = 0
});
However, the corresponding output is labeled:
ConsolePrintLn("Presented FPS 99% = %f",
*reinterpret_cast<const double*>(&pBlob[elements[4].dataOffset]));
Therefore, the output labeled Presented FPS 99% actually contains the 90th percentile value.
I believe this should be:
elements.push_back(PM_QUERY_ELEMENT{
.metric = PM_METRIC_PRESENTED_FPS,
.stat = PM_STAT_PERCENTILE_99,
.deviceId = 0,
.arrayIndex = 0
});
The same logic is already used correctly in the DynamicQuerySample() fixed query:
FixedQueryElement fps99{
this,
PM_METRIC_PRESENTED_FPS,
PM_STAT_PERCENTILE_99
};
So it looks like the AddGpuMetric() version may simply contain a copy/paste typo.
Could you please confirm whether this is an unintended error in the sample?
Thanks!
- 主要语言
- C++
- 星标
- 2.6k
- 派生
- 201
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 16
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GameTechDev/PresentMon 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
GameTechDev/PresentMon#745 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
GameTechDev/PresentMon#743 ·
维护者通常 2 天内回复
-
Runtime-generated FSR/AFMF presents may suppress simulation intervals and report 0 Simulation FPS未关闭
难度 4/5 3-5 天 新手友好度 45/100
GameTechDev/PresentMon#742 ·
维护者通常 2 天内回复
-
Reduce nonpaged memory reserved by the PresentMon ETW session at startup可能已有人在做 @markgalvan-intel 于 3 天前认领。 未关闭PresentData
GameTechDev/PresentMon#740 · 已指派 1 人 ·
维护者通常 2 天内回复
-
CLI usability issues可能已有人在做 @planetchili 于 10 天前认领。 未关闭
GameTechDev/PresentMon#734 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 GameTechDev/PresentMon 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 91/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
maplibre/maplibre-native#5072 ·
维护者通常 1 天内回复
-
bug grammar sev-5
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 79/100
tenstorrent/tt-umd#4017 ·
维护者通常 3 天内回复