Пример #1
0
        public IDiagnoser GetCompositeDiagnoser(BenchmarkCase benchmarkCase, RunMode runMode)
        {
            var diagnosersForGivenMode = diagnosers.Where(diagnoser => diagnoser.GetRunMode(benchmarkCase) == runMode).ToImmutableHashSet();

            return(diagnosersForGivenMode.Any() ? new CompositeDiagnoser(diagnosersForGivenMode) : null);
        }
Пример #2
0
 public static IDiagnoser GetCompositeDiagnoser(this IConfig config, Benchmark benchmark, RunMode runMode)
 => config.GetDiagnosers().Any(d => d.GetRunMode(benchmark) == runMode)
         ? new CompositeDiagnoser(config.GetDiagnosers().Where(d => d.GetRunMode(benchmark) == runMode).ToArray())
         : null;