예제 #1
0
 private Summary(string title, EnvironmentInfo 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;
 }
예제 #2
0
 private Summary(string title, EnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, TimeSpan totalTime, ValidationError[] validationErrors)
 {
     Title = title;
     HostEnvironmentInfo = hostEnvironmentInfo;
     Config = config;
     ResultsDirectoryPath = resultsDirectoryPath;
     TotalTime = totalTime;
     ValidationErrors = validationErrors;
 }
예제 #3
0
        public Summary(string title, IList<BenchmarkReport> reports, EnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, TimeSpan totalTime, ValidationError[] validationErrors)
            : this(title, hostEnvironmentInfo, config, resultsDirectoryPath, totalTime, validationErrors)
        {
            Benchmarks = reports.Select(r => r.Benchmark).ToArray();
            reportMap = new Dictionary<Benchmark, BenchmarkReport>();
            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());
        }
 // this method is called from our auto-generated benchmark program, keep it in mind if you want to do some renaming
 public static EnvironmentInfo GetCurrent() => Current ?? (Current = new EnvironmentInfo());
예제 #5
0
 internal static Summary CreateFailed(Benchmark[] benchmarks, string title, EnvironmentInfo hostEnvironmentInfo, IConfig config, string resultsDirectoryPath, ValidationError[] validationErrors)
 {
     return new Summary(title, hostEnvironmentInfo, config, resultsDirectoryPath, TimeSpan.Zero, validationErrors, benchmarks, new BenchmarkReport[0]);
 }