Esempio n. 1
0
        ProfileAppOptions OpenOptionsDialog()
        {
            var options = new ProfileAppOptions();

            options.MaxFrames = Settings.Instance.MaxFrames;
            options.OutputDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Desktop");
            return(options);
        }
Esempio n. 2
0
 internal void Start(string exePath, string args, ProfileAppOptions options)
 {
     LogFilePath    = Path.Combine(options.OutputDir, $"{Path.GetFileName(exePath)}_{DateTime.Now.ToString("yyyy-MM-dd__HH-mm-ss")}.mlpd");
     profileProcess = new Process();
     profileProcess.StartInfo.UseShellExecute = false;
     profileProcess.StartInfo.FileName        = "/Library/Frameworks/Mono.framework/Versions/Current/bin/mono64";
     //profileProcess.StartInfo.WorkingDirectory = "/Users/davidkarlas/GIT/mono/mcs/mcs/";
     //profileProcess.StartInfo.EnvironmentVariables["MONO_GC_PARAMS"] = "cementing";
     profileProcess.StartInfo.Arguments = $"--profile=log:heapshot=ondemand,nodefaults,gcalloc,gcmove,gcroot,counter,maxframes={options.MaxFrames},output=\"{LogFilePath}\" \"{exePath}\" {args}";
     profileProcess.Start();
 }
        public static KrofilerSession CreateFromProcess(string executableName, string args, ProfileAppOptions options)
        {
            var session = new KrofilerSession();

            session.runner = new ProfilerRunner();
            session.runner.Start(executableName, args, options);
            session.fileToProcess = session.runner.LogFilePath;
            return(session);
        }