public override bool Launch() { ClrConfig config = new ClrConfig { ProfilingMode = ProfilingMode, ListenPort = ListenPort, WaitForConnection = WaitForConnection, IncludeNative = IncludeNative, SamplingInterval = SamplingInterval, CounterInterval = CounterInterval, AllowMethodInlining = AllowMethodInlining, TrackGC = TrackGC, TrackAllocs = TrackAllocs, WeightedSampling = WeightedSampling, }; string configString = config.CreateString(); var psi = new ProcessStartInfo(Executable, Arguments); LauncherCommon.SetProcessOptions(psi, configString, LauncherCommon.GetCounterString(PerformanceCounters), true); psi.WorkingDirectory = string.IsNullOrEmpty(WorkingDir) ? Path.GetDirectoryName(Executable) : WorkingDir; try { Process.Start(psi); } catch (Exception ex) { MessageBox.Show(ex.Message, "Launch Error"); return(false); } return(true); }
public bool Launch() { NativeConfig config = new NativeConfig { ProfilingMode = ProfilerMode.Sampling, ListenPort = ListenPort, SamplingInterval = SamplingInterval, CounterInterval = 1000 }; string configString = config.CreateString(); string argStr = Executable + " " + Arguments; var psi = new ProcessStartInfo("Backends\\SlimTuneNative_x86.exe", argStr); LauncherCommon.SetProcessOptions(psi, configString, string.Empty, false); psi.WorkingDirectory = string.IsNullOrEmpty(WorkingDir) ? Path.GetDirectoryName(Executable) : WorkingDir; try { Process.Start(psi); } catch (Exception ex) { MessageBox.Show(ex.Message, "Launch Error"); return(false); } return(true); }