Exemplo n.º 1
0
        bool StartWithProfiler(string profilePath, string logFile)
        {
            if (ProfilerOptions.Type == ProfilerOptions.ProfilerType.Disabled)
            {
                return(false);
            }

            if (ProfilerOptions.MlpdOutputPath == null)
            {
                ProfilerOptions.MlpdOutputPath = Path.Combine(profilePath, "profiler.mlpd");
            }
            if (File.Exists(ProfilerOptions.MlpdOutputPath))
            {
                File.Delete(ProfilerOptions.MlpdOutputPath);
            }
            profilerProcessor = new ProfilerProcessor(scenario, ProfilerOptions);
            string monoPath = Environment.GetEnvironmentVariable("PATH")
                              .Split(Path.PathSeparator)
                              .Select(p => Path.Combine(p, "mono"))
                              .FirstOrDefault(s => File.Exists(s));

            TestService.StartSession(monoPath, profilePath, logFile, $"{profilerProcessor.GetMonoArguments ()} \"{MonoDevelopBinPath}\"");
            Console.WriteLine($"Profler is logging into {ProfilerOptions.MlpdOutputPath}");
            return(true);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 public Visitor(ProfilerProcessor profilerProcessor, HashSet <string> trackedTypeNames)
 {
     this.profilerProcessor = profilerProcessor;
     this.trackedTypeNames  = trackedTypeNames;
 }
Exemplo n.º 4
0
 public Visitor(ProfilerProcessor profilerProcessor)
 {
     this.profilerProcessor = profilerProcessor;
 }