alchemy v0.2.0 Alchemy.Experiment
Link to this section Summary
Functions
Adds a candidate function to the experiment. The candidate needs to be wrapped in a function in order to be lazily-evaluated. When the experiment is run the candidate will be evaluated and compared to the control.
Adds a comparator to use when comparing the candidate to the control. By default the comparator is
Adds a control function to the experiment. Controls should be wrapped in a function in order to be lazily-evaluated
Generates a new experiment struct
Sets the module to use for publishing results.
Runs the experiment.
Link to this section Functions
candidate(experiment, thunk)
Adds a candidate function to the experiment. The candidate needs to be wrapped in a function in order to be lazily-evaluated. When the experiment is run the candidate will be evaluated and compared to the control.
comparator(experiment, thunk)
Adds a comparator to use when comparing the candidate to the control. By default the comparator is:
fn(control, candidate) -> control == candidate end
control(experiment, thunk)
Adds a control function to the experiment. Controls should be wrapped in a function in order to be lazily-evaluated
control_value(map)
new(title)
Generates a new experiment struct
publisher(experiment, mod)
Sets the module to use for publishing results.
run(experiment)
Runs the experiment.
If the candidate
is provided then it will be run against the control
. The
control
must be provided for the experiment to be run. The control
is always returned. In order to optimize the overall execution time both the
candidate
and the control
are executed concurrently. The execution order is
randomized to account for any ordering issues.