https://github.com/p-x9/swift-cpu-info
A Swift library for getting CPU informations
https://github.com/p-x9/swift-cpu-info
cpu deviceinfo swift
Last synced: 3 months ago
JSON representation
A Swift library for getting CPU informations
- Host: GitHub
- URL: https://github.com/p-x9/swift-cpu-info
- Owner: p-x9
- License: mit
- Created: 2024-04-20T12:24:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-24T08:31:36.000Z (4 months ago)
- Last Synced: 2025-03-18T15:13:02.877Z (3 months ago)
- Topics: cpu, deviceinfo, swift
- Language: Swift
- Homepage:
- Size: 64.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swift-cpu-info
A Swift library for getting CPU informations
[](https://github.com/p-x9/swift-cpu-info/issues)
[](https://github.com/p-x9/swift-cpu-info/network/members)
[](https://github.com/p-x9/swift-cpu-info/stargazers)
[](https://github.com/p-x9/swift-cpu-info/)> [!NOTE]
> Currently only works on Apple platform.## Usage
```swift
import CPUInfo
CPUInfo.print()
``````
Type: CPU_TYPE_X86_64
SubType: CPU_SUBTYPE_X86_ARCH1
Family: CPUFAMILY_INTEL_WESTMERE
SubFamily: CPUSUBFAMILY_UNKNOWN
ThreadType: Unknown
Is64Bit: true
Brand: Apple M3 Pro
Vendor: Unknown
isTranslated: true
ActualCPUType: CPU_TYPE_ARM64
Features: ["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"]
FeatureBits: ["0b1001011110010100010000111010000", "0b111111111111000"]
Performance Core:
Name: Performance
Physical: 5
Logical: 5
L1 Cache
Instruction: 192 KB
Data: 128 KB
L2 Cache
Size: 16 MB
Cores/Cache: 5
L3 Cache
Size: Unknown
Cores/Cache: Unknown
Efficient Core:
Name: Efficiency
Physical: 6
Logical: 6
L1 Cache
Instruction: 128 KB
Data: 64 KB
L2 Cache
Size: 4 MB
Cores/Cache: 6
L3 Cache
Size: Unknown
Cores/Cache: Unknown
```## License
swift-cpu-info is released under the MIT License. See [LICENSE](./LICENSE)