benchbuild.extensions.base module

Extension base-classes for compile-time and run-time experiments.

class benchbuild.extensions.base.Extension(*extensions, config=None, **kwargs)[source]

Bases: object

An experiment functor to implement composable experiments.

An experiment extension is always callable with an arbitrary amount of arguments. The varargs component of an extension’s __call__ operator is fed the binary command that we currently execute and all arguments to the binary. Any customization necessary for the extension (e.g, dynamic configuration options) has to be passed by keyword argument.

Parameters:
  • *extensions – Variable length list of child extensions we manage.
  • config (dict, optional) – Dictionary of name value pairs to be stored for this extension.
next_extensions

Variable length list of child extensions we manage.

config

dict, optional – Dictionary of name value pairs to be stored for this extension.

call_next(*args, **kwargs) → List[benchbuild.utils.run.RunInfo][source]

Call all child extensions with the given arguments.

This calls all child extensions and collects the results for our own parent. Use this to control the execution of your nested extensions from your own extension.

Returns:
A list of collected
results of our child extensions.
Return type:list of RunInfo
print(indent=0)[source]

Print a structural view of the registered extensions.