-
Notifications
You must be signed in to change notification settings - Fork 95
Expensive setup
Josh Hiles edited this page Dec 22, 2023
·
1 revision
If an experiment requires expensive setup that should only occur when the experiment is going to be run, define it with the BeforeRun
method:
public int DoSomethingExpensive()
{
return Scientist.Science<int>("expensive-but-worthwile", experiment =>
{
experiment.BeforeRun(() => ExpensiveSetup());
experiment.Use(() => TheOldWay());
experiment.Try(() => TheNewWay());
});
}
- Publishing results
- Controlling comparison
- Adding context
- Expensive setup
- Keeping it clean
- Ignoring mismatches
- Enabling or disabling experiments
- Ramping up experiments
- Running candidates in parallel (asynchronous)
- Testing
- Handling errors
- Designing an experiment
- Finishing an experiment
Sometimes scientists just gotta do weird stuff. We understand.