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(); };
 }
예제 #2
0
		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();
            }
        }
예제 #5
0
 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);
     }
 }
예제 #6
0
        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);
        }
예제 #7
0
		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);
		}
예제 #8
0
		public void Prepend (ProfileConfiguration config)
		{
			list.Remove (config);
			list.Insert (0, config);
			while (list.Count > max_items)
				list.RemoveAt (max_items);
			OnChanged ();
		}
예제 #9
0
		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);
		}
예제 #10
0
 public StartEventArgs(ProfileConfiguration config)
 {
     this.type   = StartEventType.Repeat;
     this.config = config;
 }
예제 #11
0
 public QuickStartItem(StartPage owner, ProfileConfiguration config, string caption, string description, int x, int y) : base(owner, caption, description, x, y)
 {
     this.config = config;
 }
예제 #12
0
		public StartEventArgs (ProfileConfiguration config)
		{
			this.type = StartEventType.Repeat;
			this.config = config;
		}
예제 #13
0
			public QuickStartItem (StartPage owner, ProfileConfiguration config, string caption, string description, int x, int y) : base (owner, caption, description, x, y)
			{
				this.config = config;
			}