public static Summary Run(Benchmark[] benchmarks, IConfig config, Func <Job, IToolchain> toolchainProvider) { var resolver = DefaultResolver; config = BenchmarkConverter.GetFullConfig(benchmarks.FirstOrDefault()?.Target.Type, config); var title = GetTitle(benchmarks); var rootArtifactsFolderPath = GetRootArtifactsFolderPath(); using (var logStreamWriter = Portability.StreamWriter.FromPath(Path.Combine(rootArtifactsFolderPath, title + ".log"))) { var logger = new CompositeLogger(config.GetCompositeLogger(), new StreamLogger(logStreamWriter)); benchmarks = GetSupportedBenchmarks(benchmarks, logger, toolchainProvider, resolver); var artifactsToCleanup = new List <string>(); try { return(Run(benchmarks, logger, title, config, rootArtifactsFolderPath, toolchainProvider, resolver, artifactsToCleanup)); } finally { logger.WriteLineHeader("// * Artifacts cleanup *"); Cleanup(artifactsToCleanup); } } }
public static Summary Run(Benchmark[] benchmarks, IConfig config) { var targetType = benchmarks?.FirstOrDefault()?.Target.Type; return(BenchmarkRunnerCore.Run( new BenchmarkRunInfo(benchmarks, targetType, BenchmarkConverter.GetFullConfig(targetType, config)), ToolchainExtensions.GetToolchain)); }
internal static Summary Run(IList <Benchmark> benchmarks, IConfig config) { config = BenchmarkConverter.GetFullConfig(benchmarks.FirstOrDefault()?.Target.Type, config); var title = GetTitle(benchmarks); EnsureNoMoreThanOneBaseline(benchmarks, title); using (var logStreamWriter = new StreamWriter(title + ".log")) { var logger = new CompositeLogger(config.GetCompositeLogger(), new StreamLogger(logStreamWriter)); var summary = Run(benchmarks, logger, title, config); config.GetCompositeExporter().ExportToFiles(summary); return(summary); } }
internal static Summary Run(Benchmark[] benchmarks, IConfig config, Func <Job, IToolchain> toolchainProvider) { var resolver = DefaultResolver; config = BenchmarkConverter.GetFullConfig(benchmarks.FirstOrDefault()?.Target.Type, config); var title = GetTitle(benchmarks); var rootArtifactsFolderPath = GetRootArtifactsFolderPath(); using (var logStreamWriter = Portability.StreamWriter.FromPath(Path.Combine(rootArtifactsFolderPath, title + ".log"))) { var logger = new CompositeLogger(config.GetCompositeLogger(), new StreamLogger(logStreamWriter)); benchmarks = GetSupportedBenchmarks(benchmarks, logger, toolchainProvider, resolver); return(Run(benchmarks, logger, title, config, rootArtifactsFolderPath, toolchainProvider, resolver)); } }
internal static Summary Run(Benchmark[] benchmarks, IConfig config) { config = BenchmarkConverter.GetFullConfig(benchmarks.FirstOrDefault()?.Target.Type, config); var title = GetTitle(benchmarks); var rootArtifactsFolderPath = GetRootArtifactsFolderPath(); using (var logStreamWriter = Portability.StreamWriter.FromPath(Path.Combine(rootArtifactsFolderPath, title + ".log"))) { var logger = new CompositeLogger(config.GetCompositeLogger(), new StreamLogger(logStreamWriter)); benchmarks = GetSupportedBenchmarks(benchmarks, logger); var summary = Run(benchmarks, logger, title, config, rootArtifactsFolderPath); if (!summary.HasCriticalValidationErrors) { config.GetCompositeExporter().ExportToFiles(summary).ToArray(); } return(summary); } }