public ProfilerProcess(ProfileConfiguration config) { log_file = System.IO.Path.GetTempFileName(); proc = new Process(); proc.StartInfo.FileName = "mono"; proc.StartInfo.Arguments = "--profile=logging:" + config.ToArgs() + ",o=" + log_file + ",cp=" + Port.ToString() + " " + config.AssemblyPath; proc.EnableRaisingEvents = true; proc.Exited += delegate { OnExited(); }; }
public ProfilerProcess (ProfileConfiguration config) { log_file = System.IO.Path.GetTempFileName (); proc = new Process (); proc.StartInfo.FileName = "mono"; proc.StartInfo.Arguments = "--profile=logging:" + config.ToArgs () + ",o=" + log_file + ",cp=" + Port.ToString () + " " + config.AssemblyPath; proc.EnableRaisingEvents = true; proc.Exited += delegate { OnExited (); }; }
public void Prepend(ProfileConfiguration config) { list.Remove(config); list.Insert(0, config); while (list.Count > max_items) { list.RemoveAt(max_items); } OnChanged(); }
// Used by XmlSerializer public void Add(object obj) { ProfileConfiguration config = obj as ProfileConfiguration; if (config != null) { list.Add(config); OnChanged(); } }
public override bool Equals(object o) { if (o is ProfileConfiguration) { ProfileConfiguration c = o as ProfileConfiguration; return(AssemblyPath == c.AssemblyPath && Mode == c.Mode && StartEnabled == c.StartEnabled); } else { return(false); } }
public ProfileSetupDialog(Gtk.Window parent) : base("Profile Options", parent, DialogFlags.DestroyWithParent, Stock.Cancel, ResponseType.Cancel, Stock.Execute, ResponseType.Accept) { config = new ProfileConfiguration(); HBox box = new HBox(false, 6); box.PackStart(new Label("Assembly:"), false, false, 0); FileChooserButton assembly_button = new FileChooserButton("Select Assembly", FileChooserAction.Open); FileFilter filter = new FileFilter(); filter.AddPattern("*.exe"); assembly_button.Filter = filter; assembly_button.SelectionChanged += delegate { config.AssemblyPath = assembly_button.Filename; SetResponseSensitive(ResponseType.Accept, !String.IsNullOrEmpty(assembly_button.Filename)); }; box.PackStart(assembly_button, true, true, 0); box.ShowAll(); VBox.PackStart(box, false, false, 3); box = new HBox(false, 6); box.PackStart(new Label("Type:"), false, false, 0); ComboBox type_combo = ComboBox.NewText(); type_combo.AppendText("Allocations"); type_combo.AppendText("Calls/Instrumented"); type_combo.AppendText("Statistical"); type_combo.Active = 2; type_combo.Changed += delegate { config.Mode = (ProfileMode)(1 << type_combo.Active); }; box.PackStart(type_combo, false, false, 0); box.ShowAll(); VBox.PackStart(box, false, false, 3); box = new HBox(false, 6); CheckButton start_enabled_chkbtn = new CheckButton("Enabled at Startup"); start_enabled_chkbtn.Active = true; start_enabled_chkbtn.Toggled += delegate { config.StartEnabled = start_enabled_chkbtn.Active; }; box.PackStart(start_enabled_chkbtn, false, false, 0); box.ShowAll(); VBox.PackStart(box, false, false, 3); SetResponseSensitive(ResponseType.Accept, false); }
public ProfileSetupDialog (Gtk.Window parent) : base ("Profile Options", parent, DialogFlags.DestroyWithParent, Stock.Cancel, ResponseType.Cancel, Stock.Execute, ResponseType.Accept) { config = new ProfileConfiguration (); HBox box = new HBox (false, 6); box.PackStart (new Label ("Assembly:"), false, false, 0); FileChooserButton assembly_button = new FileChooserButton ("Select Assembly", FileChooserAction.Open); FileFilter filter = new FileFilter (); filter.AddPattern ("*.exe"); assembly_button.Filter = filter; assembly_button.SelectionChanged += delegate { config.AssemblyPath = assembly_button.Filename; SetResponseSensitive (ResponseType.Accept, !String.IsNullOrEmpty (assembly_button.Filename)); }; box.PackStart (assembly_button, true, true, 0); box.ShowAll (); VBox.PackStart (box, false, false, 3); box = new HBox (false, 6); box.PackStart (new Label ("Type:"), false, false, 0); ComboBox type_combo = ComboBox.NewText (); type_combo.AppendText ("Allocations"); type_combo.AppendText ("Calls/Instrumented"); type_combo.AppendText ("Statistical"); type_combo.Active = 2; type_combo.Changed += delegate { config.Mode = (ProfileMode) (1 << type_combo.Active); }; box.PackStart (type_combo, false, false, 0); box.ShowAll (); VBox.PackStart (box, false, false, 3); box = new HBox (false, 6); CheckButton start_enabled_chkbtn = new CheckButton ("Enabled at Startup"); start_enabled_chkbtn.Active = true; start_enabled_chkbtn.Toggled += delegate { config.StartEnabled = start_enabled_chkbtn.Active; }; box.PackStart (start_enabled_chkbtn, false, false, 0); box.ShowAll (); VBox.PackStart (box, false, false, 3); SetResponseSensitive (ResponseType.Accept, false); }
public void Prepend (ProfileConfiguration config) { list.Remove (config); list.Insert (0, config); while (list.Count > max_items) list.RemoveAt (max_items); OnChanged (); }
void StartProfile (ProfileConfiguration config) { ProfileView view = new ProfileView (); view.Show (); View = view; logging_enabled_action.Visible = true; logging_enabled_action.Active = config.StartEnabled; proc = new ProfilerProcess (config); proc.Paused += delegate { Refresh (view); }; proc.Exited += delegate { Refresh (view); logging_enabled_action.Visible = false; }; proc.Start (); log_info = new LogInfo (proc.LogFile, config.ToString ()); history.LogFiles.Prepend (log_info); history.Configs.Prepend (config); }
public StartEventArgs(ProfileConfiguration config) { this.type = StartEventType.Repeat; this.config = config; }
public QuickStartItem(StartPage owner, ProfileConfiguration config, string caption, string description, int x, int y) : base(owner, caption, description, x, y) { this.config = config; }
public StartEventArgs (ProfileConfiguration config) { this.type = StartEventType.Repeat; this.config = config; }
public QuickStartItem (StartPage owner, ProfileConfiguration config, string caption, string description, int x, int y) : base (owner, caption, description, x, y) { this.config = config; }