MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / PollStatic_

Method PollStatic_

IntelPresentMon/PresentMonAPIWrapper/StaticQuery.cpp:7–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace pmapi
6{
7 StaticQueryResult StaticQueryResult::PollStatic_(const Session& session, uint32_t pid,
8 PM_METRIC metric, uint32_t deviceId, uint32_t arrayIndex)
9 {
10 const auto pIntro = session.GetIntrospectionRoot();
11 const auto dti = pIntro->FindMetric(metric).GetDataTypeInfo();
12 StaticQueryResult result{ dti.GetFrameType(), dti.GetEnumId() };
13
14 const PM_QUERY_ELEMENT element{
15 .metric = metric,
16 .stat = PM_STAT_NONE,
17 .deviceId = deviceId,
18 .arrayIndex = arrayIndex,
19 };
20 if (const auto err = pmPollStaticQuery(session.GetHandle(), &element, pid, result.blob_.data());
21 err != PM_STATUS_SUCCESS) {
22 throw ApiErrorException{ err, "Error polling static query" };
23 }
24 return result;
25 }
26
27 StaticQueryResult PollStatic(const Session& session, const ProcessTracker& process,
28 PM_METRIC metric, uint32_t deviceId, uint32_t arrayIndex)

Callers

nothing calls this directly

Calls 7

pmPollStaticQueryFunction · 0.85
GetDataTypeInfoMethod · 0.80
FindMetricMethod · 0.80
GetEnumIdMethod · 0.80
GetIntrospectionRootMethod · 0.45
GetFrameTypeMethod · 0.45
GetHandleMethod · 0.45

Tested by

no test coverage detected