Search guides and the APICtrl K
  1. API reference
  2. System, devices and network

system_stats.h

What machine this is.

#include <sonore/system_stats.h>
On this page

Design notes

Why a plugin wants it

logger.h gives a user something to send you. This is the first line of it. "It crashes on my machine" and "it crashes on Windows 11 24H2, Ryzen 7, 32 GB, no AVX-512" are different bug reports, and only one of them can be acted on without a conversation.

It is also the honest answer to "why is this slow on my laptop": core count and CPU model explain most of it, and neither is something a user can be asked to look up.

Runtime, not compile time

simd.h decides at COMPILE time which instruction set to use, which is right for it -- a plugin ships one binary and its DSP is whatever it was built with. This asks the CPU what it actually IS, which is a different question: a binary built for SSE2 running on a machine with AVX2 is a fact worth knowing when somebody reports the CPU meter reading twice what it should.

Nothing is guessed

Anything a platform will not say comes back empty or zero. A fabricated OS version in a bug report is worse than a blank one: it sends whoever reads it looking for a bug on a system nobody was using.

Types 1

What the CPU can do, as it is RIGHT NOW rather than as the binary was built. See the header for why the two are different questions.

Functions 8

↑↓ to move↵ to openEvery public name in the headers, and every guide