示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        public StressTestApp(StressTestOptions options)
        {
            Iterations      = options.Iterations;
            ProfilerOptions = options.Profiler;
            if (!string.IsNullOrEmpty(options.MonoDevelopBinPath))
            {
                MonoDevelopBinPath = options.MonoDevelopBinPath;
            }

            if (options.UseInstalledApplication)
            {
                MonoDevelopBinPath = GetInstalledVisualStudioBinPath();
            }
        }
示例#4
0
文件: Program.cs 项目: wjohnke/CSS18
        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();
        }