Skip to content

Cleanup EM loading

Douglas Raillard requested to merge github/fork/douglas-raillard-arm/_pr231 into master

Add LinuxEnergyModel(EnergyModel) and LegacyEnergyModel(EnergyModel) sublcasses of EnergyModel, so that each of them can implement their own from_target() and check_from_target() methods.

EnergyModel.from_target() autodetects the appropriate subclass to use, so it's completely transparent.

This split can allow separate implementation of other methods as well, notably the ones dealing with idle states, allowing for potential speed-up in LinuxEnergyModel since this class registers a 0 cost for idle states/

Merge request reports