Created
December 7, 2019 15:09
-
-
Save IntegerMan/2b9dd88d6e03ffcb72badbfdd9303784 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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