lisa.wlgen.rta.RTAConf#
- class lisa.wlgen.rta.RTAConf(conf)[source]#
-
JSON configuration for rt-app.
- Parameters:
conf (object) – Python object graph with the JSON content.
Attributes
Regex to check whether the
rt-app
task name is valid.__reversed__
inheritedSee
collections.abc.Mapping.__reversed__
Properties
rt-app configuration file content as a JSON string.
logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
Same as
from_str()
but with a file path instead.Create an rt-app workload using
RTAPhase
instances.Create an rt-app workload using a pure string description.
__class_getitem__()
inheritedSee
collections.abc.Iterable.__class_getitem__()
__contains__()
inheritedSee
collections.abc.Mapping.__contains__()
get()
inheritedSee
collections.abc.Mapping.get()
get_logger()
inheritedProvides a
logging.Logger
named aftercls
.items()
inheritedSee
collections.abc.Mapping.items()
keys()
inheritedSee
collections.abc.Mapping.keys()
log_locals()
inheritedDebugging aid: log the local variables of the calling function.
values()
inheritedSee
collections.abc.Mapping.values()
Attributes#
- RTAConf.ALLOWED_TASK_NAME_REGEX = '^[a-zA-Z0-9_]+$'#
Regex to check whether the
rt-app
task name is valid.
- RTAConf.__reversed__ = None#
Properties#
- property RTAConf.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
Methods#
- classmethod RTAConf._process_template(template, duration=None, pload=None, log_dir=None)[source]#
Turn a raw string rt-app description into a JSON dict. Also, process some tokens and replace them.
- classmethod RTAConf.from_path(path, **kwargs)[source]#
Same as
from_str()
but with a file path instead.
- classmethod RTAConf.from_profile(profile, *, plat_info, force_defaults=False, max_duration_s=None, calibration=None, log_stats=False, trace_events=None, run_dir=None, lock_pages=False, no_force_default_keys=None)[source]#
Create an rt-app workload using
RTAPhase
instances- Parameters:
profile (dict) – The workload description in a {task_name :
RTATask
} shapeplat_info (lisa.platforms.platinfo.PlatformInfo) – Platform information used to tweak the configuration file according to the target.
force_defaults (bool) – If
True
, default values for all settings will be set in the first phase (unless they are set by the profile). IfFalse
, defaults will be removed from the file (even if they were explicitly set by the user).no_force_default_keys (list(str) or None) – JSON keys for which no default will be forced by
force_defaults=True
.max_duration_s (int) – Maximum duration of the workload. Will be determined by the longest running task if not specified.
calibration (int or str) – The calibration value to be used by rt-app. This can be an integer value or a CPU string (e.g. “CPU0”).
log_stats (bool) – Generate a log file with stats for each task
lock_pages (bool) – Lock the pages to memory to avoid jitter. Requires running as root.
trace_events (list(str)) – A list of trace events to generate. For a full list of trace events which can be generated by rt-app, refer to the tool documentation: scheduler-tools/rt-app By default, no events are generated.
- classmethod RTAConf.from_str(str_conf, plat_info, run_dir, max_duration_s=None, calibration=None)[source]#
Create an rt-app workload using a pure string description
- Parameters:
str_conf (str) – The raw string description. This must be a valid json description, with the exception of some tokens (see
_process_template()
) that will be replaced automagically.plat_info (lisa.platforms.platinfo.PlatformInfo) – Platform information used to tweak the configuration file according to the target.
run_dir (str) – Directory used by rt-app to produce artifacts
max_duration_s (int) – Maximum duration of the workload.
calibration (int or str) – The calibration value to be used by rt-app. This can be an integer value or a CPU string (e.g. “CPU0”).
- classmethod RTAConf.__class_getitem__()#
Inherited method, see
collections.abc.Iterable.__class_getitem__()
- RTAConf.__contains__()#
Inherited method, see
collections.abc.Mapping.__contains__()
- RTAConf.get()#
Inherited method, see
collections.abc.Mapping.get()
- classmethod RTAConf.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- RTAConf.items()#
Inherited method, see
collections.abc.Mapping.items()
- RTAConf.keys()#
Inherited method, see
collections.abc.Mapping.keys()
- classmethod RTAConf.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.
- RTAConf.values()#
Inherited method, see
collections.abc.Mapping.values()