ddn.util.monaco.energy

Energy and Power Monitoring

This module provides power consumption tracking for efficiency analysis.

Features:

  • System-wide power monitoring
  • CPU package power (where available)
  • Per-process energy estimation
  • Battery status monitoring
  • Performance-per-watt metrics

Platform Availability:

  • Intel RAPL: Linux (best), Windows (requires drivers)
  • AMD energy: Linux (limited), Windows (not available)
  • ARM energy: Linux (platform-dependent)
  • Battery status: All platforms

Types 2

System power consumption status.

This struct provides information about the current system power consumption, battery status, and power limits.

Fields
uint powerDrawWatts
uint powerLimitWatts
bool onBattery
double batteryPercent
bool batteryCharging
Duration batteryTimeLeft
structCpuPower

CPU package power information.

This struct provides per-package power consumption data, typically from Intel RAPL or similar interfaces.

Fields
uint packageId
double watts
double joules
double limit

Functions 4

fnPowerStatus powerStatus()Gets the current system power status.
fnCpuPower[] cpuPower()Gets CPU package power information.
fndouble processEnergyUsage(int pid, Duration window)Estimates energy usage for a specific process.
fndouble performancePerWatt()Calculates performance-per-watt metric.