Ejemplo n.º 1
0
 internal IEnumerable <BenchmarkReport> Run(List <Benchmark> benchmarks, string competitionName = null)
 {
     benchmarkRunIndex++;
     if (competitionName == null)
     {
         competitionName = $"BenchmarkRun-{benchmarkRunIndex:##000}-{DateTime.Now:yyyy-MM-dd-hh-mm-ss}";
     }
     using (var logStreamWriter = new StreamWriter(competitionName + ".log"))
     {
         var logger  = new BenchmarkCompositeLogger(Plugins.CompositeLogger, new BenchmarkStreamLogger(logStreamWriter));
         var reports = Run(benchmarks, logger);
         Plugins.CompositeExporter.ExportToFile(reports, competitionName);
         return(reports);
     }
 }
Ejemplo n.º 2
0
 public BenchmarkRunner(IEnumerable <IBenchmarkLogger> loggers)
 {
     Logger = new BenchmarkCompositeLogger(loggers.ToArray());
 }