Esempio n. 1
0
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            var logFile = SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);

            scenario = provider.GetTestScenario();

            if (!StartWithProfiler(profilePath, logFile))
            {
                TestService.StartSession(MonoDevelopBinPath, profilePath, logFile);
            }

            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench);

            leakProcessor = new LeakProcessor(scenario, ProfilerOptions);

            ReportMemoryUsage(setupIteration);
            for (int i = 0; i < Iterations; ++i)
            {
                scenario.Run();
                ReportMemoryUsage(i);
            }

            UserInterfaceTests.Ide.CloseAll(exit: false);
            ReportMemoryUsage(cleanupIteration);
        }
Esempio n. 2
0
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            var logFile = SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);

            scenario = provider.GetTestScenario();

            if (!StartWithProfiler(profilePath, logFile))
            {
                TestService.StartSession(MonoDevelopBinPath, profilePath, logFile);
            }

            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench, 10000);

            leakProcessor = new LeakProcessor(scenario, ProfilerOptions);

            ReportMemoryUsage("Setup");
            RunTestScenario();

            UserInterfaceTests.Ide.CloseAll(exit: false);
            ReportMemoryUsage("Cleanup");

            if (profilerProcessor != null)
            {
                var task = profilerProcessor.RemainingHeapshotsTask;
                if (!task.IsCompleted)
                {
                    Console.WriteLine("Still processing heapshots...");
                }

                task.Wait();
            }
        }