energy tests: a 0.1 J burn floor, tick-driven fake RAPL trees, stale trees cleared #136
Loading…
Reference in a new issue
No description provided.
Delete branch "energy/burn-floor-0-1-j"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two per-process energy tests required 0.2 J for 200 ms of one thread's CPU:
process_energy;process_cpu.On a busy host the burn took 1 s of wall time and read 0.171 J, and the test's own oracle around it read the same 0.171 J. The meter was right and the floor was wrong. What 200 ms of CPU costs depends on the core class that ran it; on an M5 Max it read 0.18–1.24 J. jcp-energy's and eoc-meter's equivalent tests already use 0.1 J.
Both floors are now 0.1 J. That is also the sleeping test's ceiling, so a counter that reads wall time at a fixed power still fails one of the two tests.
Verified:
cargo test -p sandbox-meter --test process_energy(5 passed) andcargo test -p jouleclaw-energy --test process_cpu(1 passed), on macOS.Fake RAPL trees: driven by the probe's tick, and cleared before use (
515545ab)sandbox-meter's
the_public_package_counter_opens_only_over_live_packagesfailed once, in a full workspace run on a heavily loaded host just after a restart. It passed on its own. I built test binaries of the old and new forms and ran each 12 times under 24 CPU hogs; both passed every time. So the cause was not reproduced. Two inputs the tests didn't control could produce it, and this commit removes both:Verified:
cargo test -p sandbox-meter --lib(122 passed) andcargo test -p jcp-energy --lib(84 passed).🤖 Generated with Claude Code
energy tests: a 200 ms burn's floor is 0.1 J in sandbox and jouleclawto energy tests: a 0.1 J burn floor, tick-driven fake RAPL trees, stale trees cleared515545abcccc133929c1