Class: Variation
Extends
BenchmarkBase
Constructors
new Variation()
new Variation(
name
):Variation
Parameters
• name: string
Returns
Overrides
BenchmarkBase.constructor
Defined in
Properties
action?
optional
action:Action
Inherited from
BenchmarkBase.action
Defined in
cliArgs
cliArgs:
string
[] =[]
Defined in
environment
environment:
Partial
<ProcessEnv
> ={}
Defined in
errorStrategy?
optional
errorStrategy:ErrorStrategy
Inherited from
BenchmarkBase.errorStrategy
Defined in
name
name:
string
Defined in
setupEachMethods
setupEachMethods:
SetupMethod
[] =[]
Inherited from
BenchmarkBase.setupEachMethods
Defined in
setupMethods
setupMethods:
SetupMethod
[] =[]
Inherited from
BenchmarkBase.setupMethods
Defined in
teardownEachMethods
teardownEachMethods:
TeardownMethod
[] =[]
Inherited from
BenchmarkBase.teardownEachMethods
Defined in
teardownMethods
teardownMethods:
TeardownMethod
[] =[]
Inherited from
BenchmarkBase.teardownMethods
Defined in
Methods
withAction()
withAction(
action
):this
Parameters
• action: Action
Returns
this
Inherited from
BenchmarkBase.withAction
Defined in
withCliArgs()
withCliArgs(...
args
):this
Parameters
• ...args: string
[]
Returns
this
Defined in
withEnvironmentVariable()
withEnvironmentVariable(
name
,value
):this
Parameters
• name: string
• value: string
Returns
this
Defined in
withEnvironmentVariables()
withEnvironmentVariables(
env
):this
Parameters
• env: Partial
<ProcessEnv
>
Returns
this
Defined in
withErrorStrategy()
withErrorStrategy(
errorStrategy
):this
Parameters
• errorStrategy: ErrorStrategy
Returns
this
Inherited from
BenchmarkBase.withErrorStrategy
Defined in
withSetup()
withSetup(
setup
):this
Parameters
• setup: SetupMethod
Returns
this
Inherited from
BenchmarkBase.withSetup
Defined in
withSetupEach()
withSetupEach(
setup
):this
Parameters
• setup: SetupMethod
Returns
this
Inherited from
BenchmarkBase.withSetupEach
Defined in
withTeardown()
withTeardown(
teardown
):this
Parameters
• teardown: TeardownMethod
Returns
this
Inherited from
BenchmarkBase.withTeardown
Defined in
withTeardownEach()
withTeardownEach(
teardown
):this
Parameters
• teardown: TeardownMethod
Returns
this
Inherited from
BenchmarkBase.withTeardownEach
Defined in
FromCliArgs()
static
FromCliArgs(args
):Variation
[]
Parameters
• args: (string
| string
[])[]
An array of options to pass to the CLI. If an element is an array, they will be treated as alternatives.
Returns
An array of variations. Can be applied with withVariations
.
Example
// Creates 2 variations, both with --flag, but one with --no-daemon and the other with --daemon.
const variations = Variation.FromCliArgs([
'--flag',
['--no-daemon', '--daemon'],
]);
// Creates 4 variations, with combinations of --a and --b.
const variations = Variation.FromCliArgs([
['--a', '--b'],
]);
Defined in
FromEnvironmentVariables()
static
FromEnvironmentVariables(variables
):Variation
[]
Parameters
• variables: EnvironmentVariableOptions