lisa.energy_model.EnergyModelRoot#
- class lisa.energy_model.EnergyModelRoot(active_states=None, idle_states=None, cpu=None, children=None, name=None)[source]#
Bases:
EnergyModelNodeConvenience class for root of an EnergyModelNode tree.
Just like EnergyModelNode except that
active_statesandidle_statesaren’t required.Attributes
cpuinheritedFor convenience, this holds the single CPU contained by leaf nodes.
Nonefor non-leaf nodes.cpusinheritedCPUs contained in this node. Includes those of child nodes.
Properties
loggerinheritedConvenience short-hand for
self.get_logger().max_capacityinheritedCompute capacity at highest frequency.
Methods
get_logger()inheritedProvides a
logging.Loggernamed 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.cpuFor convenience, this holds the single CPU contained by leaf nodes.
Nonefor non-leaf nodes.
- EnergyModelRoot.cpus#
Inherited attribute, see
lisa.energy_model.EnergyModelNode.cpusCPUs contained in this node. Includes those of child nodes.
Properties#
- property EnergyModelRoot.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property EnergyModelRoot.max_capacity#
Inherited property, see
lisa.energy_model.EnergyModelNode.max_capacityCompute capacity at highest frequency.
Methods#
- classmethod EnergyModelRoot.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed 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.