lisa.wlgen.sysbench.Sysbench#
- class lisa.wlgen.sysbench.Sysbench(*args, **kwargs)[source]#
Bases:
Workload
A sysbench workload
- Parameters:
target (Target) – The Target on which to execute this workload
max_duration_s (int) – Maximum duration in seconds
max_requests (int) – Maximum number of event requests
cli_options (dict(str, object)) – Dictionary of cli_options passed to sysbench command line. Run
sysbench --test=<test> help
for available parameters. Character_
in option names is replaced by-
.
- Variable keyword arguments:
Forwarded to
lisa.wlgen.workload.Workload
Attributes
The tools required to execute the workload. See
lisa.target.Target.install_tools()
.Properties
logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
__enter__()
inherited__exit__()
inheritedCleanup the artifacts of the workload on the target.
__init_subclass__()
inheritedAutomatically decorate
_run()
so that it returns a context manager.cleanup()
inheritedRemove all the artifacts installed on the target with
deploy()
.deploy()
inheritedDeploy the workload on the target.
factory()
inheritedDecorator to use on alternative constructors, i.e. classmethods that return instances of the class.
get_logger()
inheritedProvides a
logging.Logger
named aftercls
.log_locals()
inheritedDebugging aid: log the local variables of the calling function.
run()
inheritedRun the workload and returns the post-processed output.
run_background()
inheritedRun the command asynchronously and give control back to the caller.
wipe_run_dir()
inheritedWipe all content from the
run_dir
target directory and all its empty parents.
Attributes#
- Sysbench.REQUIRED_TOOLS = ['sysbench']#
The tools required to execute the workload. See
lisa.target.Target.install_tools()
.
Properties#
- property Sysbench.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
Methods#
- Sysbench.__del__()#
- Sysbench.__enter__()#
Inherited method, see
lisa.wlgen.workload.Workload.__enter__()
- Sysbench.__exit__(exc_type, exc_val, exc_tb)#
Inherited method, see
lisa.wlgen.workload.Workload.__exit__()
Cleanup the artifacts of the workload on the target.
- classmethod Sysbench.__init_subclass__(*args, **kwargs)#
Inherited method, see
lisa.wlgen.workload.Workload.__init_subclass__()
Automatically decorate
_run()
so that it returns a context manager.
- Sysbench.cleanup()#
Inherited method, see
lisa.wlgen.workload.Workload.cleanup()
Remove all the artifacts installed on the target with
deploy()
.
- Sysbench.deploy()#
Inherited method, see
lisa.wlgen.workload.Workload.deploy()
Deploy the workload on the target.
- classmethod Sysbench.factory(f)#
Inherited method, see
lisa.utils.PartialInit.factory()
Decorator to use on alternative constructors, i.e. classmethods that return instances of the class.
- classmethod Sysbench.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- classmethod Sysbench.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.
- Sysbench.run(cpus=None, cgroup=None, as_root=False, timeout=None)#
Inherited method, see
lisa.wlgen.workload.Workload.run()
Run the workload and returns the post-processed output.
- Sysbench.run_background()#
Inherited method, see
lisa.wlgen.workload.Workload.run_background()
Run the command asynchronously and give control back to the caller.
- Sysbench.wipe_run_dir()#
Inherited method, see
lisa.wlgen.workload.Workload.wipe_run_dir()
Wipe all content from the
run_dir
target directory and all its empty parents.