Esempio n. 1
0
        public static void Main(string[] args)
        {
            var config = new ManualConfig();

            config.Add(DefaultConfig.Instance);
            config.Set(config.GetSummaryStyle().WithTimeUnit(TimeUnit.Nanosecond));

            BenchmarkRunner.Run <Benchmarks>(config);
        }
Esempio n. 2
0
        private IConfig CreateBenchmarkConfig(ICompetitionConfig competitionConfig)
        {
            // ReSharper disable once UseObjectOrCollectionInitializer
            var result = new ManualConfig();

            // TODO: to overridable methods?
            result.KeepBenchmarkFiles = competitionConfig.KeepBenchmarkFiles;
            result.UnionRule          = competitionConfig.UnionRule;
            result.Set(competitionConfig.GetOrderProvider());

            result.Add(OverrideJobs(competitionConfig).ToArray());
            result.Add(OverrideExporters(competitionConfig).ToArray());
            result.Add(OverrideDiagnosers(competitionConfig).ToArray());

            result.Add(GetLoggers(competitionConfig).ToArray());
            result.Add(GetColumns(competitionConfig).ToArray());
            result.Add(GetValidators(competitionConfig).ToArray());
            result.Add(GetAnalysers(competitionConfig).ToArray());

            return(result.AsReadOnly());
        }