🤖 AI Summary
A new open-source Go library (github.com/BinSquare/powermetrics-go, Apache 2.0) wraps macOS powermetrics to expose detailed, real‑time system telemetry for Macs: CPU/GPU/DRAM/ANE power, frequencies, temperatures, utilization, per‑process CPU/GPU activity, CPU/GPU residency tables, network/disk I/O and interrupt stats. It provides a Parser/Config model and streaming helpers (RunDefaultStream / RunWithErrors) that deliver Metrics and Errors channels, so you can build CLI tools or embed power-aware profiling and observability into apps. A bundled example CLI supports JSON output, sampling intervals, and selective views (system, process, residency, network, disk, interrupts).
This is significant for ML and systems folks who need precise, programmatic access to power and performance on Apple Silicon and Intel Macs for benchmarking, energy-aware scheduling, model profiling or runtime optimization. Important technical notes: powermetrics must run as root (sudo) so your app needs elevated privileges; different powermetrics versions expose/summarize thermal and residency fields differently (Apple Silicon temps sometimes report 0 and ANE power/usage may appear as 0 — contributions to parsing are welcome). The library exposes fine-grained fields like CPUPowerWatts/GPUPowerWatts/ANEPowerWatts, CPU/GPU frequency and residency maps, busy percentages and per-process wakeups, enabling accurate energy and performance analyses.
Loading comments...
login to comment
loading comments...
no comments yet