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

Method GetCpuName

IntelPresentMon/ControlLib/CpuTelemetry.cpp:13–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 using namespace pmon::util;
12
13std::string CpuTelemetry::GetCpuName() {
14 if (cpu_name_.size() == 0) {
15 std::wstring local_cpu_name{};
16 if (ExecuteWQLProcessorNameQuery(local_cpu_name)) {
17 cpu_name_ = str::TrimWhitespace(str::ToNarrow(local_cpu_name));
18 } else {
19 cpu_name_ = "UNKNOWN_CPU";
20 }
21 }
22
23 return cpu_name_;
24}
25
26bool CpuTelemetry::ExecuteWQLProcessorNameQuery(
27 std::wstring& processor_name) {

Callers

nothing calls this directly

Calls 3

TrimWhitespaceFunction · 0.85
ToNarrowFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected