static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } bool success = true; app = new StressTestApp(options); try { app.Start(); } catch { success = false; using (var p = Process.Start("/usr/sbin/screencapture", "screenshot-failure.png")) { Console.WriteLine("Taking screenshot at point of failure"); p.WaitForExit(); } throw; } finally { app.Stop(success); } }
static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } bool success = true; app = new StressTestApp(options); try { app.Start(); } catch { success = false; throw; } finally { app.Stop(success); } }
public StressTestApp(StressTestOptions options) { Iterations = options.Iterations; ProfilerOptions = options.Profiler; if (!string.IsNullOrEmpty(options.MonoDevelopBinPath)) { MonoDevelopBinPath = options.MonoDevelopBinPath; } if (options.UseInstalledApplication) { MonoDevelopBinPath = GetInstalledVisualStudioBinPath(); } }
static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } app = new StressTestApp(options); app.Start(); app.Stop(); }