measure_energy
Measure the electrical energy consumed by a shell command using CPU power sampling and idle baseline subtraction. Reports average energy, standard deviation, and coefficient of variation.
Instructions
Measure the electrical energy (joules) a shell command consumes while running.
Methodology: samples CPU package power at 100 ms during the run, subtracts a separately measured idle baseline, repeats the run (default 3x) and reports mean/stdev/CV. Use absolute paths; wrap any path containing spaces in double quotes. Expect ~(idle_seconds + repeats x runtime) of wall time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| repeats | No | ||
| idle_seconds | No |