Exemplo n.º 1
0
 private Summary(string title, HostEnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, TimeSpan totalTime, ValidationError[] validationErrors, Benchmark[] benchmarks, BenchmarkReport[] reports)
     : this(title, hostEnvironmentInfo, config, resultsDirectoryPath, totalTime, validationErrors)
 {
     Benchmarks = benchmarks;
     Table = new SummaryTable(this);
     Reports = reports ?? new BenchmarkReport[0];
 }
Exemplo n.º 2
0
 private Summary(string title, HostEnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, TimeSpan totalTime, ValidationError[] validationErrors)
 {
     Title = title;
     HostEnvironmentInfo = hostEnvironmentInfo;
     Config = config;
     ResultsDirectoryPath = resultsDirectoryPath;
     TotalTime = totalTime;
     ValidationErrors = validationErrors;
     Reports = new BenchmarkReport[0];
 }
Exemplo n.º 3
0
        public Summary(string title, IList<BenchmarkReport> reports, HostEnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, TimeSpan totalTime, ValidationError[] validationErrors)
            : this(title, hostEnvironmentInfo, config, resultsDirectoryPath, totalTime, validationErrors)
        {
            Benchmarks = reports.Select(r => r.Benchmark).ToArray();
            foreach (var report in reports)
                reportMap[report.Benchmark] = report;
            Reports = Benchmarks.Select(b => reportMap[b]).ToArray();

            var orderProvider = config.GetOrderProvider() ?? DefaultOrderProvider.Instance;
            Benchmarks = orderProvider.GetSummaryOrder(Benchmarks, this).ToArray();
            Reports = Benchmarks.Select(b => reportMap[b]).ToArray();

            TimeUnit = TimeUnit.GetBestTimeUnit(reports.Where(r => r.ResultStatistics != null).Select(r => r.ResultStatistics.Mean).ToArray());
            Table = new SummaryTable(this);
            shortInfos = new Dictionary<IJob, string>();
            jobs = new Lazy<IJob[]>(() => Benchmarks.Select(b => b.Job).ToArray());
        }
 public new static HostEnvironmentInfo GetCurrent() => Current ?? (Current = new HostEnvironmentInfo());
Exemplo n.º 5
0
 internal static Summary CreateFailed(Benchmark[] benchmarks, string title, HostEnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, ValidationError[] validationErrors)
 {
     return new Summary(title, hostEnvironmentInfo, config, resultsDirectoryPath, TimeSpan.Zero, validationErrors, benchmarks, new BenchmarkReport[0]);
 }
Exemplo n.º 6
0
 public new static HostEnvironmentInfo GetCurrent() => Current ?? (Current = new HostEnvironmentInfo());