-
Notifications
You must be signed in to change notification settings - Fork 95
Ramping up experiments
Josh Hiles edited this page Dec 22, 2023
·
1 revision
As a scientist, you know it's always important to be able to turn your experiment off, lest it run amok and result in villagers with pitchforks on your doorstep. You can set a global switch to control whether or not experiments is enabled by using the Scientist.Enabled
method.
int percentEnabled = 10;
Random rand = new Random();
Scientist.Enabled(() =>
{
return rand.Next(100) < percentEnabled;
});
This code will be invoked for every method with an experiment every time, so be sensitive about its performance. For example, you can store an experiment in the database but wrap it in various levels of caching.
- 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.