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

REQUIRED_TOOLS

The tools required to execute the workload. See lisa.target.Target.install_tools().

Properties

logger inherited

Convenience short-hand for self.get_logger().

Methods

__del__()

__enter__() inherited

__exit__() inherited

Cleanup the artifacts of the workload on the target.

__init_subclass__() inherited

Automatically decorate _run() so that it returns a context manager.

cleanup() inherited

Remove all the artifacts installed on the target with deploy().

deploy() inherited

Deploy the workload on the target.

factory() inherited

Decorator to use on alternative constructors, i.e. classmethods that return instances of the class.

get_logger() inherited

Provides a logging.Logger named after cls.

log_locals() inherited

Debugging aid: log the local variables of the calling function.

run() inherited

Run the workload and returns the post-processed output.

run_background() inherited

Run the command asynchronously and give control back to the caller.

wipe_run_dir() inherited

Wipe 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 after cls.

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.