public async Task <AnalysisResult> AnalyzeAsync(AnalysisContext context) { _logger.Info("Starting analysis phase one."); _logger.Info($"Context: {context.ToLogString()}"); // Find appropriate launches number iteratively (part 1 of phase 1). AnalysisPhaseOnePartOneResult partOneResult = await PerformPartOneAsync(context); AnalysisContext updatedContext = context.CreateWith( args: context.Args.CreateWith(partOneResult.CalculatedSampleSize) ); // Check H0 hypothesis on calculated launches number (part 2 of phase 1). AnalysisPhaseOnePartTwoResult partTwoResult = await PerfromPartTwoAsync(updatedContext, partOneResult); if (partTwoResult.IsH0HypothesisProved) { return(AnalysisResult.CreateSuccess( "H0 hypothesis for the algorithm was proved.", updatedContext )); } return(AnalysisResult.CreateFailure( "H0 hypothesis for the algorithm was not proved.", updatedContext )); }
public async Task <AnalysisResult> AnalyzeAsync(AnalysisContext context) { _logger.Info("Starting analysis phase two."); _logger.Info($"Context: {context.ToLogString()}"); // Perform full analysis and calculate confidence complexity function. AnalysisPhaseTwoResult _ = await PerformPhaseTwoAsync(context); _logger.Info("Finished analysis phase two."); return(AnalysisResult.CreateSuccess("Analysis finished successfully.", context)); }