Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class ResumeResultPublisher : IResultPublisher
public Task Publish<T, TClean>(Result<T, TClean> result)
Console.WriteLine($"Results are available for experiment {result.ExperimentName}");
var baseResult = (AnalysisResult)result.Control.Value;
Console.WriteLine($"Control value score: {baseResult.Score}");
foreach (var obs in result.MismatchedObservations)
Console.WriteLine($"Result {obs.Name}");
Console.WriteLine($"Completed in {obs.Duration.TotalMilliseconds}ms");
var analysisResult = (AnalysisResult)obs.Value;
Console.WriteLine($"resulted in mismatched value of {analysisResult.Score}");
// NOTE: This is where you should log to disk, database, or error tracking service
return Task.CompletedTask;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment