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

Link to this function

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.

Link to this function

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
Link to this function

control(experiment, thunk)

Adds a control function to the experiment. Controls should be wrapped in a function in order to be lazily-evaluated

Link to this function

control_value(map)

Generates a new experiment struct

Link to this function

publisher(experiment, mod)

Sets the module to use for publishing results.

Link to this function

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.