base/include/system/cpu/cfcpu_profile.h¶
Declares the CPU performance information query interface. More...
Namespaces¶
| Name |
|---|
| cf |
Classes¶
| Name | |
|---|---|
| struct | cf::CPUProfileInfo CPU performance and capacity information. |
Detailed Description¶
Declares the CPU performance information query interface.
Author: Charliechen114514
Version: 0.1
Since: 0.1
Date: 2026-02-21
Provides cross-platform access to CPU core counts, frequencies, and current usage percentage.
Source code¶
#pragma once
#include "base/expected/expected.hpp"
#include <cstdint>
namespace cf {
enum class CPUProfileInfoError {
CPUProfileInfoGeneralError
};
struct CPUProfileInfo {
uint16_t logical_cnt;
uint16_t physical_cnt;
uint32_t current_frequecy;
uint32_t max_frequency;
float cpu_usage_percentage;
};
expected<CPUProfileInfo, CPUProfileInfoError> getCPUProfileInfo();
} // namespace cf
Updated on 2026-03-09 at 10:14:01 +0000