Scientist v0.2.0 Scientist

A library for carefully refactoring critical paths in your elixir application.

Summary

Macros

Adds a before_run function to the experiment created in science/3

Adds a candidate block to the experiment created in science/3

Adds a clean function to the experiment created in science/3

Adds a compare block to the experiment created in science/3

Adds a control block to the experiment created in science/3

Adds an ignore block to the experiment created in science/3

Adds an ignore block to the experiment created in science/3

Adds a run_if function to the experiment created in science/3

Creates a new experiment

Macros

before_run(list)

Adds a before_run function to the experiment created in science/3.

See Scientist.Experiment.set_before_run/2.

candidate(name \\ "candidate", list)

Adds a candidate block to the experiment created in science/3.

See Scientist.Experiment.add_candidate/2.

clean(x, list)

Adds a clean function to the experiment created in science/3.

The observed values will be bound to the parameter given.

See Scientist.Experiment.clean_with/2.

compare(x, y, list)

Adds a compare block to the experiment created in science/3.

The control and candidate values will be bound to the declared parameters in order.

See Scientist.Experiment.compare_with/2.

control(list)

Adds a control block to the experiment created in science/3.

See Scientist.Experiment.add_control/2.

ignore(list)

Adds an ignore block to the experiment created in science/3.

See Scientist.Experiment.ignore/2.

ignore(x, y, list)

Adds an ignore block to the experiment created in science/3.

The control and candidate values will be bound to the declared parameters in order.

See Scientist.Experiment.ignore/2.

run_if(list)

Adds a run_if function to the experiment created in science/3.

See Scientist.Experiment.set_run_if/2.

science(name, opts \\ [], list)

Creates a new experiment.

Creates an experiment with name and opts. The block will behave the same as the control block given, returning the same value and raising the same exceptions.

The stacktrace of the raised exceptions will be preserved.

See Scientist.Experiment.new/2 for a list of available options.