-
Notifications
You must be signed in to change notification settings - Fork 95
Controlling comparison
Josh Hiles edited this page Dec 22, 2023
·
1 revision
Scientist compares control and candidate values using ==
. To override this behavior, use Compare
to define how to compare observed values instead:
public IUser GetCurrentUser(string hash)
{
return Scientist.Science<IUser>("get-current-user", experiment =>
{
experiment.Compare((x, y) => x.Name == y.Name);
experiment.Use(() => LookupUser(hash));
experiment.Try(() => RetrieveUser(hash));
});
}
- 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.