lisa.wlgen.rta.RTAPhaseBase#
- class lisa.wlgen.rta.RTAPhaseBase(properties=None, **kwargs)[source]#
Bases:
SimpleHash
,Mapping
,ABC
Base class for rt-app phase modelisation.
- Parameters:
properties (object) – Properties mapping to set on that phase. See
RTAPhaseProperties.from_polymorphic()
for the accepted formats. Alternatively, keyword argumentsprop_*
can be used.prop_cpus (set(int) or None or lisa.wlgen.rta.CPUProperty) – CPU affinity property.
prop_dl_deadline (int or lisa.wlgen.rta.DeadlineDeadlineProperty) –
SCHED_DEADLINE
scheduler policy’s deadline property.prop_dl_period (int or lisa.wlgen.rta.DeadlinePeriodProperty) –
SCHED_DEADLINE
scheduler policy’s period property.prop_dl_runtime (int or lisa.wlgen.rta.DeadlineRuntimeProperty) –
SCHED_DEADLINE
scheduler policy’s runtime property or, since Linux 6.12,SCHED_OTHER
scheduler policy’s custom slice length.prop_meta (dict or lisa.wlgen.rta.MetaStoreProperty) – Plain key-value storage to be used as the user see fit.
prop_name (str or lisa.wlgen.rta.NameProperty) – Name the phase.
prop_numa_nodes_membind (set(int) or None or lisa.wlgen.rta.NUMAMembindProperty) – NUMA node membind property.
prop_policy (str or lisa.wlgen.rta.PolicyProperty) – Scheduler policy property.
prop_priority (int or lisa.wlgen.rta.PriorityProperty) – Task scheduler priority property.
prop_taskgroup (str or lisa.wlgen.rta.TaskGroupProperty) – Task group property.
prop_uclamp (tuple(int or None, int or None) or UclampProperty or lisa.wlgen.rta.UclampProperty) – Set util clamp (uclamp) values.
prop_wload (lisa.wlgen.rta.WloadPropertyBase) – Phase workload.
Attributes
__reversed__
inheritedSee
collections.abc.Mapping.__reversed__
Methods
Compose two phases together by running one after the other.
Lookup the value of the given property on that phase.
Update the docstring used as a
str.format()
template with the following keys:.Multiply the phase by
n
, in order to repeat it.rt-app JSON representation of the phase.
Split the
kwargs
into two categories:.Delete all the given property names, equivalent to
with_props(foo=delete())
.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.Same as
with_phase_properties()
but withproperties
passed toRTAPhaseProperties.from_polymorphic()
first.Same as
with_phase_properties()
but using keyword arguments to set each property. The resulting dictionary is passed toRTAPhaseProperties.from_polymorphic()
first.HASH_COERCE()
inheritedUsed to coerce the values of
self.__dict__
to hashable values.__class_getitem__()
inheritedSee
collections.abc.Iterable.__class_getitem__()
__contains__()
inheritedSee
collections.abc.Mapping.__contains__()
get()
inheritedSee
collections.abc.Mapping.get()
items()
inheritedSee
collections.abc.Mapping.items()
keys()
inheritedSee
collections.abc.Mapping.keys()
values()
inheritedSee
collections.abc.Mapping.values()
Attributes#
- RTAPhaseBase.__reversed__ = None#
Methods#
- RTAPhaseBase.__add__(other)[source]#
Compose two phases together by running one after the other.
Since this operation returns an
RTAPhaseTree
, it is possible to set properties on it that will only apply to its children.
- RTAPhaseBase.__await__()#
- classmethod RTAPhaseBase.__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:.
- abstract RTAPhaseBase.get_rtapp_repr(*, task_name, plat_info, force_defaults=False, no_force_default_keys=None, **kwargs)[source]#
rt-app JSON representation of the phase.
- Parameters:
task_name (str) – Name of the task this phase will be attached to.
plat_info (lisa.platforms.platinfo.PlatformInfo) – Platform information used to compute default properties and validate them.
force_defaults (bool) – If
True
, a default value will be provided for all properties that are not set. IfFalse
, the defaults will not be provided if the user-provided properties don’t touch a given JSON key.no_force_default_keys (list(str) or None) – List of JSON keys for which no default will be emitted when
force_defaults=True
.
- Variable keyword arguments:
Forwarded to
RTAPhase.to_json()
- static RTAPhaseBase.split_prop_kwargs(kwargs, properties=None)[source]#
Split the
kwargs
into two categories:Arguments with a name starting with
prop_
. They are then merged with the optionalproperties
.The others
Returns a tuple
(properties, other_kwargs)
.
- RTAPhaseBase.with_delete_props(properties)[source]#
Delete all the given property names, equivalent to
with_props(foo=delete())
- RTAPhaseBase.with_phase_properties(properties)[source]#
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.
- RTAPhaseBase.with_properties_map(properties, **kwargs)[source]#
Same as
with_phase_properties()
but withproperties
passed toRTAPhaseProperties.from_polymorphic()
first.
- RTAPhaseBase.with_props(**kwargs)[source]#
Same as
with_phase_properties()
but using keyword arguments to set each property. The resulting dictionary is passed toRTAPhaseProperties.from_polymorphic()
first.
- RTAPhaseBase.HASH_COERCE(x, coerce)#
Inherited method, see
lisa.utils.SimpleHash.HASH_COERCE()
Used to coerce the values of
self.__dict__
to hashable values.
- classmethod RTAPhaseBase.__class_getitem__()#
Inherited method, see
collections.abc.Iterable.__class_getitem__()
- RTAPhaseBase.__contains__()#
Inherited method, see
collections.abc.Mapping.__contains__()
- RTAPhaseBase.get()#
Inherited method, see
collections.abc.Mapping.get()
- RTAPhaseBase.items()#
Inherited method, see
collections.abc.Mapping.items()
- RTAPhaseBase.keys()#
Inherited method, see
collections.abc.Mapping.keys()
- RTAPhaseBase.values()#
Inherited method, see
collections.abc.Mapping.values()