lisa.wlgen.rta.Phase#
- class lisa.wlgen.rta.Phase(duration_s, period_ms, duty_cycle_pct, cpus=None, barrier_after=None, uclamp_min=None, uclamp_max=None, numa_nodes_membind=None, **kwargs)[source]#
Bases:
RTAPhase
Descriptor for an rt-app load phase
- Parameters:
duration_s (float) – the phase duration in [s].
period_ms (float) – the phase period in [ms].
duty_cycle_pct (float) – the generated load in percents.
cpus (list(int) or None) – the CPUs on which task execution is restricted during this phase. If unspecified, that phase will be allowed to run on any CPU, regardless of the affinity of the previous phases.
barrier_after (str) – if provided, the name of the barrier to sync against when reaching the end of this phase. Currently only supported when duty_cycle_pct=100
uclamp_min (int) – the task uclamp.min value to set for the task for the duration of the phase.
uclamp_max (int) – the task uclamp.max value to set for the task for the duration of the phase.
numa_nodes_membind (list(int) or None) – the list of NUMA Nodes. Task will only allocate memory from these nodes during this phase. If unspecified, that phase will be allowed to allocate memory from any NUMA node, regardless of the previous phase settings.
Attributes
__reversed__
inheritedSee
collections.abc.Mapping.__reversed__
Properties
is_empty
inheritedTrue
if the phase has no content and will result in an empty JSON phase(s).phases
inheritedTopological sort of the phases in the tree, with the properties merged along each path from the root to the leaves.
Methods
HASH_COERCE()
inheritedUsed to coerce the values of
self.__dict__
to hashable values.__add__()
inheritedCompose two phases together by running one after the other.
__await__()
inherited__class_getitem__()
inheritedSee
collections.abc.Iterable.__class_getitem__()
__contains__()
inheritedSee
collections.abc.Mapping.__contains__()
__getitem__()
inheritedLookup the value of the given property on that phase.
__init_subclass__()
inheritedUpdate the docstring used as a
str.format()
template with the following keys:.__iter__()
inherited__len__()
inherited__mul__()
inheritedMultiply the phase by
n
, in order to repeat it.__rmul__()
inheritedget()
inheritedSee
collections.abc.Mapping.get()
get_rtapp_repr()
inheritedrt-app JSON representation of the phase.
items()
inheritedSee
collections.abc.Mapping.items()
keys()
inheritedSee
collections.abc.Mapping.keys()
split_prop_kwargs()
inheritedSplit the
kwargs
into two categories:.to_json()
inheritedJSON content of the properties of the phase.
topo_sort()
inheritedTopological sort of the subtree.
values()
inheritedSee
collections.abc.Mapping.values()
with_delete_props()
inheritedDelete all the given property names, equivalent to
with_props(foo=delete())
.with_phase_properties()
inheritedReturn a cloned instance with the properties combined with the given
properties
usingRTAPhaseProperties.__and__()
(&
). Theproperties
parameter is the left operand. Ifproperties
isNone
, just return the phase itself.with_properties_map()
inheritedSame as
with_phase_properties()
but withproperties
passed toRTAPhaseProperties.from_polymorphic()
first.with_props()
inheritedSame as
with_phase_properties()
but using keyword arguments to set each property. The resulting dictionary is passed toRTAPhaseProperties.from_polymorphic()
first.
Attributes#
- Phase.__reversed__ = None#
Properties#
- property Phase.is_empty#
Inherited property, see
lisa.wlgen.rta.RTAPhase.is_empty
True
if the phase has no content and will result in an empty JSON phase(s).
- property Phase.phases#
Inherited property, see
lisa.wlgen.rta.RTAPhase.phases
Topological sort of the phases in the tree, with the properties merged along each path from the root to the leaves.
Methods#
- Phase.HASH_COERCE(x, coerce)#
Inherited method, see
lisa.utils.SimpleHash.HASH_COERCE()
Used to coerce the values of
self.__dict__
to hashable values.
- Phase.__add__(other)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__add__()
Compose two phases together by running one after the other.
- Phase.__await__()#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__await__()
- classmethod Phase.__class_getitem__()#
Inherited method, see
collections.abc.Iterable.__class_getitem__()
- Phase.__contains__()#
Inherited method, see
collections.abc.Mapping.__contains__()
- Phase.__getitem__(key)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__getitem__()
Lookup the value of the given property on that phase.
- classmethod Phase.__init_subclass__(**kwargs)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__init_subclass__()
Update the docstring used as a
str.format()
template with the following keys:.
- Phase.__iter__()#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__iter__()
- Phase.__len__()#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__len__()
- Phase.__mul__(n)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__mul__()
Multiply the phase by
n
, in order to repeat it.
- Phase.__rmul__(n)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.__rmul__()
- Phase.get()#
Inherited method, see
collections.abc.Mapping.get()
- Phase.get_rtapp_repr(task_name, plat_info, force_defaults=False, no_force_default_keys=None, **kwargs)#
Inherited method, see
lisa.wlgen.rta.RTAPhase.get_rtapp_repr()
rt-app JSON representation of the phase.
- Phase.items()#
Inherited method, see
collections.abc.Mapping.items()
- Phase.keys()#
Inherited method, see
collections.abc.Mapping.keys()
- static Phase.split_prop_kwargs(kwargs, properties=None)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.split_prop_kwargs()
Split the
kwargs
into two categories:.
- Phase.to_json(**kwargs)#
Inherited method, see
lisa.wlgen.rta.RTAPhase.to_json()
JSON content of the properties of the phase.
- Phase.topo_sort()#
Inherited method, see
lisa.wlgen.rta.RTAPhase.topo_sort()
Topological sort of the subtree.
- Phase.values()#
Inherited method, see
collections.abc.Mapping.values()
- Phase.with_delete_props(properties)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.with_delete_props()
Delete all the given property names, equivalent to
with_props(foo=delete())
.
- Phase.with_phase_properties(properties)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.with_phase_properties()
Return a cloned instance with the properties combined with the given
properties
usingRTAPhaseProperties.__and__()
(&
). Theproperties
parameter is the left operand. Ifproperties
isNone
, just return the phase itself.
- Phase.with_properties_map(properties, **kwargs)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.with_properties_map()
Same as
with_phase_properties()
but withproperties
passed toRTAPhaseProperties.from_polymorphic()
first.
- Phase.with_props(**kwargs)#
Inherited method, see
lisa.wlgen.rta.RTAPhaseBase.with_props()
Same as
with_phase_properties()
but using keyword arguments to set each property. The resulting dictionary is passed toRTAPhaseProperties.from_polymorphic()
first.