Snakepit.Hardware.CPUDetector (Snakepit v0.8.7)
View SourceCPU hardware detection.
Detects CPU model, cores, threads, memory, and CPU features (SSE, AVX, etc.).
Summary
Types
@type cpu_info() :: %{ cores: pos_integer(), threads: pos_integer(), model: String.t(), features: [atom()], memory_total_mb: non_neg_integer() }
Functions
@spec detect() :: cpu_info()
Detects CPU hardware information.
Returns a map with:
:cores- Number of physical CPU cores:threads- Number of logical threads (cores * hyperthreading):model- CPU model name string:features- List of detected CPU feature atoms (e.g.,:avx,:sse4_2):memory_total_mb- Total system memory in MB