lisa.energy_model.EnergyModelRoot#
- class lisa.energy_model.EnergyModelRoot(active_states=None, idle_states=None, cpu=None, children=None, name=None)[source]#
Bases:
EnergyModelNode
Convenience class for root of an EnergyModelNode tree.
Just like EnergyModelNode except that
active_states
andidle_states
aren’t required.Attributes
cpu
inheritedFor convenience, this holds the single CPU contained by leaf nodes.
None
for non-leaf nodes.cpus
inheritedCPUs contained in this node. Includes those of child nodes.
Properties
logger
inheritedConvenience short-hand for
self.get_logger()
.max_capacity
inheritedCompute capacity at highest frequency.
Methods
get_logger()
inheritedProvides a
logging.Logger
named aftercls
.idle_state_by_idx()
inheritedReturn the idle state with index
idx
.iter_leaves()
inheritedIterate over leaves.
iter_nodes()
inheritedIterate over nodes depth-first, post-order.
log_locals()
inheritedDebugging aid: log the local variables of the calling function.
Attributes#
- EnergyModelRoot.cpu#
Inherited attribute, see
lisa.energy_model.EnergyModelNode.cpu
For convenience, this holds the single CPU contained by leaf nodes.
None
for non-leaf nodes.
- EnergyModelRoot.cpus#
Inherited attribute, see
lisa.energy_model.EnergyModelNode.cpus
CPUs contained in this node. Includes those of child nodes.
Properties#
- property EnergyModelRoot.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
- property EnergyModelRoot.max_capacity#
Inherited property, see
lisa.energy_model.EnergyModelNode.max_capacity
Compute capacity at highest frequency.
Methods#
- classmethod EnergyModelRoot.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- EnergyModelRoot.idle_state_by_idx(idx)#
Inherited method, see
lisa.energy_model.EnergyModelNode.idle_state_by_idx()
Return the idle state with index
idx
.
- EnergyModelRoot.iter_leaves()#
Inherited method, see
lisa.energy_model.EnergyModelNode.iter_leaves()
Iterate over leaves.
- EnergyModelRoot.iter_nodes()#
Inherited method, see
lisa.energy_model.EnergyModelNode.iter_nodes()
Iterate over nodes depth-first, post-order.
- classmethod EnergyModelRoot.log_locals(var_names=None, level='debug')#
Inherited method, see
lisa.utils.Loggable.log_locals()
Debugging aid: log the local variables of the calling function.