| 597 | } |
| 598 | |
| 599 | std::string SystemInformation::GetCPUDescription() |
| 600 | { |
| 601 | std::ostringstream oss; |
| 602 | oss << this->GetNumberOfPhysicalCPU() << " core "; |
| 603 | if (this->GetModelName().empty()) { |
| 604 | oss << this->GetProcessorClockFrequency() << " MHz " |
| 605 | << this->GetVendorString() << " " << this->GetExtendedProcessorName(); |
| 606 | } else { |
| 607 | oss << this->GetModelName(); |
| 608 | } |
| 609 | |
| 610 | // remove extra spaces |
| 611 | std::string tmp = oss.str(); |
| 612 | size_t pos; |
| 613 | while ((pos = tmp.find(" ")) != std::string::npos) { |
| 614 | tmp.replace(pos, 2, " "); |
| 615 | } |
| 616 | |
| 617 | return tmp; |
| 618 | } |
| 619 | |
| 620 | char const* SystemInformation::GetOSName() |
| 621 | { |
no test coverage detected