Ejemplo n.º 1
0
        void PostLoad(SpringPaths paths)
        {
            Benchmarks =
                Benchmarks.Select(
                    x =>
                    Benchmark.GetBenchmarks(paths).SingleOrDefault(y => y.BenchmarkPath == x.BenchmarkPath) ??
                    Benchmark.GetBenchmarks(paths).First(y => y.Name == x.Name)).ToList();

            foreach (var tr in TestCases)
            {
                tr.Config = Config.GetConfigs(paths).SingleOrDefault(x => x.ConfigPath == tr.Config.ConfigPath) ??
                            Config.GetConfigs(paths).First(x => x.Name == tr.Config.Name);

                tr.StartScript = StartScript.GetStartScripts(paths).SingleOrDefault(x => x.ScriptPath == tr.StartScript.ScriptPath) ??
                                 StartScript.GetStartScripts(paths).First(x => x.Name == tr.StartScript.Name);
            }
        }
Ejemplo n.º 2
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();

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

            Table       = GetTable(config.GetSummaryStyle());
            shortInfos  = new Dictionary <Job, string>();
            jobs        = new Lazy <Job[]>(() => Benchmarks.Select(b => b.Job).ToArray());
            AllRuntimes = BuildAllRuntimes();
        }
Ejemplo n.º 3
0
        public Summary(string title, IList <BenchmarkReport> reports, EnvironmentHelper hostEnvironmentHelper, IConfig config, string currentDirectory, TimeSpan totalTime)
        {
            Title = title;
            HostEnvironmentHelper = hostEnvironmentHelper;
            Config           = config;
            CurrentDirectory = currentDirectory;
            TotalTime        = totalTime;

            Reports    = new Dictionary <Benchmark, BenchmarkReport>();
            Benchmarks = reports.Select(r => r.Benchmark).ToArray();
            foreach (var report in reports)
            {
                Reports[report.Benchmark] = report;
            }

            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());
        }
Ejemplo n.º 4
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());
        }