Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public AnalysisResult Analyze(Resume resume) {
var oldAnalyzer = new LegacyAnalyzer();
var newAnalyzer = new ExperimentalAnalyzer();
return Scientist.Science<AnalysisResult>("Simple Experiment",
experiment =>
// This analyzer's result will returned
experiment.Use(() => oldAnalyzer.Analyze(resume));
// This will be run, but its value will not be returned
experiment.Try(() => newAnalyzer.Analyze(resume));
// Tell Scientist how to compare two results
experiment.Compare((x, y) => x.Score == y.Score);
experiment.AddContext("Person", resume.FullName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment