Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5117 for trunk/sources


Ignore:
Timestamp:
12/16/10 17:57:47 (14 years ago)
Author:
epitzer
Message:

(#47)

  • Disable detailed logging while not stepping for drastic reduction in log size
  • Optionally disable operator trace for much faster execution and persistence (disabled by default)
  • Initially enable stepping over stack operations
Location:
trunk/sources/HeuristicLab.DebugEngine/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DebugEngine/3.3/DebugEngine.cs

    r5114 r5117  
    161161      lastUpdateTime = DateTime.Now;
    162162      timer.Start();
    163       ProcessNextOperation();
     163      ProcessNextOperation(true);
    164164      while (skipStackOperations && !(CurrentOperation is IAtomicOperation) && CanContinue)
    165         ProcessNextOperation();
     165        ProcessNextOperation(true);
    166166      timer.Stop();
    167167      ExecutionTime += DateTime.Now - lastUpdateTime;
     
    215215      timer.Start();
    216216      if (!pausePending && !stopPending && CanContinue)
    217         ProcessNextOperation();
     217        ProcessNextOperation(false);
    218218      while (!pausePending && !stopPending && CanContinue && !IsAtBreakpoint)
    219         ProcessNextOperation();
     219        ProcessNextOperation(false);
    220220      timer.Stop();
    221221      ExecutionTime += DateTime.Now - lastUpdateTime;
     
    247247    /// is pushed on the stack again.<br/>
    248248    /// If the execution was successful <see cref="EngineBase.OnOperationExecuted"/> is called.</remarks>
    249     protected virtual void ProcessNextOperation() {
     249    protected virtual void ProcessNextOperation(bool logOperations) {
    250250      try {
    251251        IAtomicOperation atomicOperation = CurrentOperation as IAtomicOperation;
     
    255255
    256256        if (atomicOperation != null) {
    257           Log.LogMessage(string.Format("Performing atomic operation {0}", Utils.Name(atomicOperation)));
     257          if (logOperations)
     258            Log.LogMessage(string.Format("Performing atomic operation {0}", Utils.Name(atomicOperation)));
    258259          PerformAtomicOperation(atomicOperation);
    259260        } else if (operations != null) {
    260           Log.LogMessage("Expanding operation collection");
     261          if (logOperations)
     262            Log.LogMessage("Expanding operation collection");
    261263          ExecutionStack.AddRange(operations.Reverse());
    262264          CurrentOperation = null;
    263265        } else if (ExecutionStack.Count > 0) {
    264           Log.LogMessage("Popping execution stack");
     266          if (logOperations)
     267            Log.LogMessage("Popping execution stack");
    265268          CurrentOperation = ExecutionStack.Last();
    266269          ExecutionStack.RemoveAt(ExecutionStack.Count - 1);
    267270        } else {
    268           Log.LogMessage("Nothing to do");
     271          if (logOperations)
     272            Log.LogMessage("Nothing to do");
    269273        }
    270274        OperatorTrace.Regenerate(CurrentAtomicOperation);
  • trunk/sources/HeuristicLab.DebugEngine/3.3/DebugEngineView.Designer.cs

    r5114 r5117  
    7777      // executionStackView
    7878      //
    79       this.executionStackView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    80                   | System.Windows.Forms.AnchorStyles.Left)
    81                   | System.Windows.Forms.AnchorStyles.Right)));
     79      this.executionStackView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     80            | System.Windows.Forms.AnchorStyles.Left)
     81            | System.Windows.Forms.AnchorStyles.Right)));
    8282      this.executionStackView.Caption = "Execution Stack View";
    8383      this.executionStackView.Content = null;
     
    124124      this.skipStackOpsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    125125      this.skipStackOpsCheckBox.AutoSize = true;
     126      this.skipStackOpsCheckBox.Checked = true;
     127      this.skipStackOpsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    126128      this.skipStackOpsCheckBox.Location = new System.Drawing.Point(63, 516);
    127129      this.skipStackOpsCheckBox.Name = "skipStackOpsCheckBox";
     
    146148      // splitContainer3
    147149      //
    148       this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    149                   | System.Windows.Forms.AnchorStyles.Left)
    150                   | System.Windows.Forms.AnchorStyles.Right)));
     150      this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     151            | System.Windows.Forms.AnchorStyles.Left)
     152            | System.Windows.Forms.AnchorStyles.Right)));
    151153      this.splitContainer3.Location = new System.Drawing.Point(0, 0);
    152154      this.splitContainer3.Name = "splitContainer3";
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTrace.cs

    r5114 r5117  
    3636    [Storable]
    3737    protected Dictionary<IAtomicOperation, IAtomicOperation> parents;
     38
     39    [Storable]
     40    protected bool isEnabled;
    3841    #endregion
    3942
     
    9093
    9194    public virtual void RegisterParenthood(IAtomicOperation parent, IOperation children) {
     95      if (!isEnabled)
     96        return;
    9297      OperationCollection operations = children as OperationCollection;
    9398      if (operations != null)
     
    117122    }
    118123
     124    public bool IsEnabled {
     125      get { return isEnabled; }
     126      set {
     127        if (isEnabled == value)
     128          return;
     129        isEnabled = value;
     130        if (!isEnabled)
     131          Reset();
     132      }
     133    }
     134
    119135    #endregion
    120136  }
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.Designer.cs

    r5116 r5117  
    5050      this.listViewColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
    5151      this.imageList = new System.Windows.Forms.ImageList(this.components);
     52      this.isEnabledCheckbox = new System.Windows.Forms.CheckBox();
    5253      this.operatorTraceGroupBox.SuspendLayout();
    5354      this.SuspendLayout();
     
    5556      // operatorTraceGroupBox
    5657      //
     58      this.operatorTraceGroupBox.Controls.Add(this.isEnabledCheckbox);
    5759      this.operatorTraceGroupBox.Controls.Add(this.listView);
    5860      this.operatorTraceGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     
    7375      this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
    7476      this.listView.HideSelection = false;
    75       this.listView.Location = new System.Drawing.Point(6, 19);
     77      this.listView.Location = new System.Drawing.Point(6, 43);
    7678      this.listView.Name = "listView";
    7779      this.listView.ShowItemToolTips = true;
    78       this.listView.Size = new System.Drawing.Size(140, 464);
     80      this.listView.Size = new System.Drawing.Size(140, 440);
    7981      this.listView.SmallImageList = this.imageList;
    8082      this.listView.TabIndex = 0;
     
    8991      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    9092      //
     93      // isEnabledCheckbox
     94      //
     95      this.isEnabledCheckbox.AutoSize = true;
     96      this.isEnabledCheckbox.Location = new System.Drawing.Point(7, 20);
     97      this.isEnabledCheckbox.Name = "isEnabledCheckbox";
     98      this.isEnabledCheckbox.Size = new System.Drawing.Size(65, 17);
     99      this.isEnabledCheckbox.TabIndex = 1;
     100      this.isEnabledCheckbox.Text = "Enabled";
     101      this.isEnabledCheckbox.UseVisualStyleBackColor = true;
     102      this.isEnabledCheckbox.CheckedChanged += new System.EventHandler(this.isEnabledCheckbox_CheckedChanged);
     103      //
    91104      // OperatorTraceView
    92105      //
     
    97110      this.Size = new System.Drawing.Size(152, 489);
    98111      this.operatorTraceGroupBox.ResumeLayout(false);
     112      this.operatorTraceGroupBox.PerformLayout();
    99113      this.ResumeLayout(false);
    100114
     
    107121    private System.Windows.Forms.ImageList imageList;
    108122    private System.Windows.Forms.ColumnHeader listViewColumnHeader;
     123    private System.Windows.Forms.CheckBox isEnabledCheckbox;
    109124  }
    110125}
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.cs

    r5114 r5117  
    101101    }
    102102
     103    protected override void SetEnabledStateOfControls() {
     104      base.SetEnabledStateOfControls();
     105      isEnabledCheckbox.Enabled = Content != null;
     106    }
     107
    103108    #region Event Handlers (child controls)
    104109    private void listView_ItemActivate(object sender, EventArgs e) {
     
    111116    }
    112117    #endregion
     118
     119    private void isEnabledCheckbox_CheckedChanged(object sender, EventArgs e) {
     120      Content.IsEnabled = isEnabledCheckbox.Checked;
     121    }
    113122  }
    114123
Note: See TracChangeset for help on using the changeset viewer.