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!
Possible bug in
DynamicQuerySample/AddGpuMetricI 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:
However, the corresponding output is labeled:
Therefore, the output labeled
Presented FPS 99%actually contains the90th percentilevalue.I believe this should be:
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!