lisa.wlgen.rta.IOWload#
- class lisa.wlgen.rta.IOWload(size, **kwargs)[source]#
Bases:
WloadPropertyBaseWorkload for the
iorunevent.- Parameters:
size (int) – Size in bytes to be written to the file.
Classes
__class__inheritedMetaclass for properties.
Attributes
Subclasses can override this attribute so that
PropertyBase.from_key()knows that it can call their_from_key()method for that key.JSON_KEYinheritedOPTIMIZE_JSON_KEYSinheritedConfiguration driving the JSON optimization, as a
dict(str, set(str)).REQUIRED_KCONFIG_KEYSinheritedList of KCONFIG keys that need to be =Y on the target kernel for this property to be usable.
Properties
Value to pass to JSON.
keyinheritedKey of the instance.
loggerinheritedConvenience short-hand for
self.get_logger().valinheritedValue “payload” of the property.
Methods
Combine two instances of the same property together.
HASH_COERCE()inheritedUsed to coerce the values of
self.__dict__to hashable values.__add__()inheritedAdding two workloads together concatenates them.
__await__()inherited__mul__()inheritedReplicate the given workload
ntimes.__rmul__()inheritedcheck_kconfig()inheritedCheck whether
plat_infocontains the kernel KCONFIG keys contained inREQUIRED_KCONFIG_KEYS.find_cls()inheritedFind which subclass can handle
key.from_key()inheritedAlternative constructor that is available with the same signature for all properties.
get_logger()inheritedProvides a
logging.Loggernamed aftercls.log_locals()inheritedDebugging aid: log the local variables of the calling function.
to_default_json()inheritedSimilar to
to_json()but returns the default values for the keys set into_json().to_json()inheritedSnippet of JSON content for that property as Python objects.
Classes#
- IOWload.__class__#
alias of
PropertyMeta
Attributes#
- IOWload.KEY = None#
Subclasses can override this attribute so that
PropertyBase.from_key()knows that it can call their_from_key()method for that key.Note
This class attribute will not be inherited automatically so that each class can be uniquely identified by its key. Subclass that do not override the value explicitly will get
None.
- IOWload.JSON_KEY = 'events'#
- IOWload.OPTIMIZE_JSON_KEYS = {}#
Inherited attribute, see
lisa.wlgen.rta.ConcretePropertyBase.OPTIMIZE_JSON_KEYSConfiguration driving the JSON optimization, as a
dict(str, set(str)).
- IOWload.REQUIRED_KCONFIG_KEYS = []#
Inherited attribute, see
lisa.wlgen.rta.ConcretePropertyBase.REQUIRED_KCONFIG_KEYSList of KCONFIG keys that need to be =Y on the target kernel for this property to be usable.
Properties#
- property IOWload.json_value#
Value to pass to JSON.
- property IOWload.key#
Inherited property, see
lisa.wlgen.rta.PropertyBase.keyKey of the instance.
- property IOWload.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property IOWload.val#
Inherited property, see
lisa.wlgen.rta.WloadPropertyBase.valValue “payload” of the property.
Methods#
- IOWload.__and__()#
Combine two instances of the same property together.
This is used to combine properties at the various levels of the
RTAPhaseTreetree, on each path from the root to the leaves. It is guaranteed that the instance closer to the root will beselfand the one closer to the leaves will beother.If the property is a constraint, a good implementation should combine two instances by applying the strongest constraint. For example, CPU affinity are combined by taking the intersection of allowed CPUs.
If the property is some sort of “dummy” structure, it can make sense to allow the instance closer to the root of the tree to override the set members in the instance closer to the leaves.
Otherwise, it’s probably best to just bail with
ValueErrorwith a message explaining that there is a conflict.
- IOWload.to_events(**kwargs)#
- IOWload.HASH_COERCE(x, coerce)#
Inherited method, see
lisa.utils.SimpleHash.HASH_COERCE()Used to coerce the values of
self.__dict__to hashable values.
- IOWload.__add__(other)#
Inherited method, see
lisa.wlgen.rta.WloadPropertyBase.__add__()Adding two workloads together concatenates them.
- IOWload.__await__()#
Inherited method, see
lisa.wlgen.rta.WloadPropertyBase.__await__()
- IOWload.__mul__(n)#
Inherited method, see
lisa.wlgen.rta.WloadPropertyBase.__mul__()Replicate the given workload
ntimes.
- IOWload.__rmul__(n)#
Inherited method, see
lisa.wlgen.rta.WloadPropertyBase.__rmul__()
- classmethod IOWload.check_kconfig(plat_info, strict=True)#
Inherited method, see
lisa.wlgen.rta.ConcretePropertyBase.check_kconfig()Check whether
plat_infocontains the kernel KCONFIG keys contained inREQUIRED_KCONFIG_KEYS.
- classmethod IOWload.find_cls(key)#
Inherited method, see
lisa.wlgen.rta.PropertyBase.find_cls()Find which subclass can handle
key.
- classmethod IOWload.from_key(key, val)#
Inherited method, see
lisa.wlgen.rta.PropertyBase.from_key()Alternative constructor that is available with the same signature for all properties.
- classmethod IOWload.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed aftercls.
- classmethod IOWload.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.
- classmethod IOWload.to_default_json(plat_info, properties)#
Inherited method, see
lisa.wlgen.rta.ConcretePropertyBase.to_default_json()Similar to
to_json()but returns the default values for the keys set into_json().
- IOWload.to_json(plat_info, **kwargs)#
Inherited method, see
lisa.wlgen.rta.ConcretePropertyBase.to_json()Snippet of JSON content for that property as Python objects.