Currently, the measurement interval is fixed to 1s (if no signals arrive).
This is unnecessarily often. We only need to measure often enough that we are guaranteed to never loose an overflow. Thus we should read the maximum_power_watts for the domains, and calculate from this value and RAPL_ENERGY_UNIT how long it takes for an overflow. Then we should probably use half of this as wait time between measurements.
This should reduce the overhead of the measurements further. On my machine, for example, the energy unit is 6.103516e-05, so assuming 100W power consumption it would take over half an hour for an overflow. So if this is done, #10 would be much less important.
We should also add some assertions, for example that for each measurement interval the power consumption is in the expected interval [0, maximum_power_watts].
Currently, the measurement interval is fixed to 1s (if no signals arrive).
This is unnecessarily often. We only need to measure often enough that we are guaranteed to never loose an overflow. Thus we should read the
maximum_power_watts
for the domains, and calculate from this value andRAPL_ENERGY_UNIT
how long it takes for an overflow. Then we should probably use half of this as wait time between measurements.This should reduce the overhead of the measurements further. On my machine, for example, the energy unit is 6.103516e-05, so assuming 100W power consumption it would take over half an hour for an overflow. So if this is done, #10 would be much less important.
We should also add some assertions, for example that for each measurement interval the power consumption is in the expected interval
[0, maximum_power_watts]
.