.. title:: EnergyModel lisa.energy_model.EnergyModel ============================= .. autoclass:: lisa.energy_model::EnergyModel :no-members: :no-inherited-members: :no-undoc-members: :no-private-members: :no-special-members: .. rubric:: Attributes .. list-table:: :align: left * - :attr:`~lisa.energy_model.EnergyModel.capacity_scale` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel The relative computational capacity of the most powerful CPU at its highest available frequency. Utilisation is in the interval ``[0, capacity_scale]``. * - :attr:`~lisa.energy_model.EnergyModel.cpu_nodes` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of leaf (CPU) :class:`EnergyModelNode`. * - :attr:`~lisa.energy_model.EnergyModel.cpus` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of logical CPU numbers in the system. * - :attr:`~lisa.utils.Serializable.ATTRIBUTES_SERIALIZATION` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Attributes to be treated specially during serialization. * - :attr:`~lisa.utils.Serializable.DEFAULT_SERIALIZATION_FMT` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Default format used when serializing objects. * - :attr:`~lisa.utils.Serializable.YAML_ENCODING` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Encoding used for YAML files. .. rubric:: Properties .. list-table:: :align: left * - :attr:`~lisa.energy_model.EnergyModel.biggest_cpus` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel The CPUs with the highest compute capacity at their highest frequency. * - :attr:`~lisa.energy_model.EnergyModel.cpu_groups` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of lists of CPUs who share the same active state values. * - :attr:`~lisa.energy_model.EnergyModel.is_heterogeneous` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel True iff CPUs do not all have the same efficiency and OPP range. * - :attr:`~lisa.energy_model.EnergyModel.littlest_cpus` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel The CPUs with the lowest compute capacity at their highest frequency. * - :attr:`~lisa.energy_model.EnergyModel.node_groups` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of lists of CPUs nodes who share the same active state values. * - :attr:`~lisa.utils.Loggable.logger` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Convenience short-hand for ``self.get_logger()``. .. rubric:: Methods .. list-table:: :align: left * - :meth:`~lisa.energy_model.EnergyModel.estimate_from_cpu_util` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Estimate the energy usage of the system under a utilization distribution. * - :meth:`~lisa.energy_model.EnergyModel.estimate_from_trace` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Estimate the energy consumption of the system by looking at a trace. * - :meth:`~lisa.energy_model.EnergyModel.from_target` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Create an instance of (a subclass of) :class:``EnergyModel`` by reading a target filesystem. * - :meth:`~lisa.energy_model.EnergyModel.get_cpu_capacity` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Convenience method to get the capacity of a CPU at a given frequency. * - :meth:`~lisa.energy_model.EnergyModel.get_optimal_placements` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Find the optimal distribution of work for a set of tasks. * - :meth:`~lisa.energy_model.EnergyModel.guess_freqs` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Work out CPU frequencies required to execute a workload. * - :meth:`~lisa.energy_model.EnergyModel.guess_idle_states` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Pessimistically guess the idle states that each CPU may enter. * - :meth:`~lisa.energy_model.EnergyModel.probe_target` - .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel Check if an :class:`EnergyModel` can be loaded from the target. * - :meth:`~lisa.utils.Serializable.__copy__` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Regular shallow copy operation, without dropping any attributes. * - :meth:`~lisa.utils.Serializable.__getstate__` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Filter the instance's attributes upon serialization. * - :meth:`~lisa.utils.Serializable.__setstate__` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable * - :meth:`~lisa.utils.Serializable.from_path` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Deserialize an object from a file. * - :meth:`~lisa.utils.Loggable.get_logger` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Provides a :class:`logging.Logger` named after ``cls``. * - :meth:`~lisa.utils.Loggable.log_locals` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Debugging aid: log the local variables of the calling function. * - :meth:`~lisa.utils.Serializable.to_path` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Serialize the object to a file. * - :meth:`~lisa.utils.Serializable.to_yaml` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Serializable Return a YAML string with the serialized object. Attributes ---------- .. attribute:: EnergyModel.capacity_scale :canonical: lisa.energy_model.EnergyModel.capacity_scale .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel The relative computational capacity of the most powerful CPU at its highest available frequency. Utilisation is in the interval ``[0, capacity_scale]``. .. attribute:: EnergyModel.cpu_nodes :canonical: lisa.energy_model.EnergyModel.cpu_nodes .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of leaf (CPU) :class:`EnergyModelNode` .. attribute:: EnergyModel.cpus :canonical: lisa.energy_model.EnergyModel.cpus .. withrefctx:: :module: lisa.energy_model :class: lisa.energy_model.EnergyModel List of logical CPU numbers in the system .. autoattribute:: lisa.energy_model::EnergyModel.ATTRIBUTES_SERIALIZATION .. autoattribute:: lisa.energy_model::EnergyModel.DEFAULT_SERIALIZATION_FMT .. autoattribute:: lisa.energy_model::EnergyModel.YAML_ENCODING Properties ---------- .. autoproperty:: lisa.energy_model::EnergyModel.biggest_cpus .. autoproperty:: lisa.energy_model::EnergyModel.cpu_groups .. autoproperty:: lisa.energy_model::EnergyModel.is_heterogeneous .. autoproperty:: lisa.energy_model::EnergyModel.littlest_cpus .. autoproperty:: lisa.energy_model::EnergyModel.node_groups .. autoproperty:: lisa.energy_model::EnergyModel.logger Methods ------- .. automethod:: lisa.energy_model::EnergyModel.estimate_from_cpu_util .. automethod:: lisa.energy_model::EnergyModel.estimate_from_trace .. automethod:: lisa.energy_model::EnergyModel.from_target .. automethod:: lisa.energy_model::EnergyModel.get_cpu_capacity .. automethod:: lisa.energy_model::EnergyModel.get_optimal_placements .. automethod:: lisa.energy_model::EnergyModel.guess_freqs .. automethod:: lisa.energy_model::EnergyModel.guess_idle_states .. automethod:: lisa.energy_model::EnergyModel.probe_target .. automethod:: lisa.energy_model::EnergyModel.__copy__ .. automethod:: lisa.energy_model::EnergyModel.__getstate__ .. automethod:: lisa.energy_model::EnergyModel.__setstate__ .. automethod:: lisa.energy_model::EnergyModel.from_path .. automethod:: lisa.energy_model::EnergyModel.get_logger .. automethod:: lisa.energy_model::EnergyModel.log_locals .. automethod:: lisa.energy_model::EnergyModel.to_path .. automethod:: lisa.energy_model::EnergyModel.to_yaml .. automethod:: lisa.energy_model::EnergyModel.from_debugfsEM_target .. automethod:: lisa.energy_model::EnergyModel.from_sd_target