private static async Task Main(string[] args) { // Allow a special "manual" argument for convenient perfview.exe-monitored runs for GC pressure analysis. if (args.Length == 1 && args[0] == "manual") { var b = new InvokeBenchmarks { Formatter = "MessagePack" }; b.Setup(); await b.InvokeAsync_NoArgs(); await Task.Delay(2000); for (int i = 0; i < 1000; i++) { await b.InvokeAsync_NoArgs(); } } else { IConfig?config = null; #if DEBUG config = new DebugInProcessConfig(); #endif IEnumerable <Summary>?summaries = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config); } }
private static async Task Main(string[] args) { // Allow a special "manual" argument for convenient perfview.exe-monitored runs for GC pressure analysis. if (args.Length == 1 && args[0] == "manual") { var b = new InvokeBenchmarks(); await b.InvokeAsync_NoArgs(); await Task.Delay(2000); for (int i = 0; i < 1000; i++) { await b.InvokeAsync_NoArgs(); } } else { var summaries = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); } }