CPU energy measurement with Intel RAPL (the counters pyJoules reads).
``EnergyMeter`` reads ``/sys/class/powercap/intel-rapl:*/energy_uj`` directly (same source
as ``pyJoules``' ``RaplPackageDomain``/``RaplCoreDomain``), handles counter wraparound with
``max_energy_range_uj`` and subtracts an idle baseline:
E_net = E_measured - P_idle * duration.
Recent kernels make ``energy_uj`` root-readable only. Run experiments through
``experiments/run_with_energy.sh``, which makes the counters world-readable once per boot
(``sudo chmod -R a+r /sys/class/powercap/intel-rapl``) and runs Python as the normal user.
Without readable counters the meter still records wall/CPU time and reports energy as NaN
(``backend == "none"``), so experiments never fail because of permissions.
Caveats recorded with every result (:meth:`EnergyMeter.describe`): RAPL measures the whole
package (all processes), the update interval is about 1 ms, so energy of sub-millisecond
calls (policy inference, plan check) is measured by :func:`benchmark` over many repetitions.