using System.Collections.Generic; using Nuke.Common.Tooling; namespace _build.benchmarks { public static class DotNetBenchmarkExtensions { public static IReadOnlyCollection DotNetBenchmark(Configure configurator) { return DotNetBenchmark(configurator(new BenchmarkToolSettings())); } public static IReadOnlyCollection DotNetBenchmark(BenchmarkToolSettings toolSettings = null) { toolSettings ??= new BenchmarkToolSettings(); var process = ProcessTasks.StartProcess(toolSettings); process.AssertZeroExitCode(); return process.Output; } } }