Beispiel #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);
        }
Beispiel #2
0
 void RunScenarioIterations(string suffix)
 {
     for (int i = 0; i < Iterations; ++i)
     {
         scenario.Run();
         ReportMemoryUsage($"Run_{i}_{suffix}");
     }
 }
Beispiel #3
0
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);
            if (ProfilerOptions.Type != StressTestOptions.ProfilerOptions.ProfilerType.Disabled)
            {
                if (ProfilerOptions.MlpdOutputPath == null)
                {
                    ProfilerOptions.MlpdOutputPath = Path.Combine(profilePath, "profiler.mlpd");
                }
                if (File.Exists(ProfilerOptions.MlpdOutputPath))
                {
                    File.Delete(ProfilerOptions.MlpdOutputPath);
                }
                profilerProcessor = new ProfilerProcessor(ProfilerOptions);
                string monoPath = Environment.GetEnvironmentVariable("PATH")
                                  .Split(Path.PathSeparator)
                                  .Select(p => Path.Combine(p, "mono"))
                                  .FirstOrDefault(s => File.Exists(s));
                TestService.StartSession(monoPath, profilePath, $"{profilerProcessor.GetMonoArguments ()} \"{MonoDevelopBinPath}\"");
                Console.WriteLine($"Profler is logging into {ProfilerOptions.MlpdOutputPath}");
            }
            else
            {
                TestService.StartSession(MonoDevelopBinPath, profilePath);
            }
            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench);

            scenario = TestScenarioProvider.GetTestScenario();

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

            UserInterfaceTests.Ide.CloseAll(exit: false);
            ReportMemoryUsage(cleanupIteration);
        }
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);

            TestService.StartSession(MonoDevelopBinPath, profilePath);
            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench);

            scenario = TestScenarioProvider.GetTestScenario();

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