internal static BenchmarkOptions FromCommandLine(string[] args) { MutableOptions options = new MutableOptions() { WarmUpTimeSeconds = 1, TestTimeSeconds = 10 }; ICommandLineParser parser = new CommandLineParser(new CommandLineParserSettings(Console.Error)); if (!parser.ParseArguments(args, options)) { return(null); } return(new BenchmarkOptions { DryRunOnly = options.DryRunOnly, TypeFilter = options.TypeFilter, MethodFilter = options.MethodFilter, WarmUpTime = Duration.FromSeconds(options.WarmUpTimeSeconds), TestTime = Duration.FromSeconds(options.TestTimeSeconds), Timer = new WallTimer(), DisplayRawData = options.DisplayRawData, XmlFile = options.XmlFile, Label = options.Label, }); }
internal static BenchmarkOptions FromCommandLine(string[] args) { MutableOptions options = new MutableOptions() { WarmUpTimeSeconds = 1, TestTimeSeconds = 10 }; ICommandLineParser parser = new CommandLineParser(new CommandLineParserSettings(Console.Error)); if (!parser.ParseArguments(args, options)) { return(null); } return(new BenchmarkOptions { DryRunOnly = options.DryRunOnly, TypeFilter = options.TypeFilter, MethodFilter = options.MethodFilter, WarmUpTime = Duration.FromSeconds(options.WarmUpTimeSeconds), TestTime = Duration.FromSeconds(options.TestTimeSeconds), Timer = new WallTimer(), DisplayRawData = options.DisplayRawData, XmlFile = options.XmlFile, Label = options.Label, MachineOverride = options.MachineOverride, IncludedCategories = options.IncludedCategories == null ? null : options.IncludedCategories.Split(',').ToList(), ExcludedCategories = options.ExcludedCategories == null ? null : options.ExcludedCategories.Split(',').ToList() }); }