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
-
area/build-framework kind/enhancement priority/low
難度 2/5 1-3 小時 新手友好度 77/100
yugabyte/yugabyte-db#38826 ·
維護者通常 1 天內回覆
-
bug compositor:other void
難度 2/5 1-3 小時 新手友好度 62/100
noctalia-dev/noctalia#5451 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 91/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 69/100
maplibre/maplibre-native#5072 ·
維護者通常 1 天內回覆