B2019-161 Document duration of various sections of code

B2019-161 Timing of refresh timer
This commit is contained in:
Rich 2019-10-29 13:15:55 +00:00
parent 2f06862a79
commit b82f015286

View File

@ -1227,6 +1227,9 @@ namespace VEPROMS
} }
} }
tc.ShuttingDown = true; // This keeps PROMS from Hanging under certain circumstances tc.ShuttingDown = true; // This keeps PROMS from Hanging under certain circumstances
// B2019-161 When shutting down output the timing information (to the error log)
if (VolianTimer.TimingsOn)
VolianTimer.ShowTimers();
foreach (DisplayTabItem dti in tc.MyBar.Items) foreach (DisplayTabItem dti in tc.MyBar.Items)
{ {
if (dti.MyDSOTabPanel != null) if (dti.MyDSOTabPanel != null)
@ -1332,7 +1335,8 @@ namespace VEPROMS
} }
} }
private bool _RefreshTimerActive = false; private bool _RefreshTimerActive = false;
// B2019-161 When tracking timing time this action
private static VolianTimer _TimeActivity = new VolianTimer("frmVEPROMS.cs _RefreshTimer_Tick", 1346);
public bool RefreshTimerActive public bool RefreshTimerActive
{ {
get { return _RefreshTimerActive; } get { return _RefreshTimerActive; }
@ -1343,9 +1347,11 @@ namespace VEPROMS
//_MyLog.DebugFormat("_RefreshTimer_Tick {0}", RefreshTimerActive); //_MyLog.DebugFormat("_RefreshTimer_Tick {0}", RefreshTimerActive);
if (RefreshTimerActive) if (RefreshTimerActive)
{ {
_TimeActivity.Open();
RefreshTimerActive = false; RefreshTimerActive = false;
if (PauseRefresh) return; if (PauseRefresh) return;
RefreshChanged(this); RefreshChanged(this);
_TimeActivity.Close();
} }
} }
@ -2101,9 +2107,11 @@ namespace VEPROMS
frm.ProgressBar = bottomProgBar; frm.ProgressBar = bottomProgBar;
frm.ShowDialog(this); frm.ShowDialog(this);
} }
private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108);
void tmrCloseTabItems_Tick(object sender, EventArgs e) void tmrCloseTabItems_Tick(object sender, EventArgs e)
{ {
_TimeActivity1.Open();
tmrCloseTabItems.Enabled = false; tmrCloseTabItems.Enabled = false;
while (MyCloseTabList.CountDTI > 0) while (MyCloseTabList.CountDTI > 0)
{ {
@ -2117,6 +2125,7 @@ namespace VEPROMS
tc.CloseTabItem(dti); tc.CloseTabItem(dti);
} }
tmrCloseTabItems.Enabled = true; tmrCloseTabItems.Enabled = true;
_TimeActivity1.Close();
} }
private void InitializeSecurity() private void InitializeSecurity()
@ -2683,6 +2692,7 @@ namespace VEPROMS
} }
} }
private frmVEPROMS selectedChildWindow = null; // C2015-022 used for separate windows private frmVEPROMS selectedChildWindow = null; // C2015-022 used for separate windows
private static VolianTimer _TimeActivity2 = new VolianTimer("frmVEPROMS.cs tmrTreeView_Tick", 2697);
/// <summary> /// <summary>
/// This event is fired from the timer after the treeview click event completes /// This event is fired from the timer after the treeview click event completes
/// </summary> /// </summary>
@ -2690,17 +2700,24 @@ namespace VEPROMS
/// <param name="e"></param> /// <param name="e"></param>
private void tmrTreeView_Tick(object sender, EventArgs e) private void tmrTreeView_Tick(object sender, EventArgs e)
{ {
_TimeActivity2.Open();
bool giveTvFocus = true; bool giveTvFocus = true;
tmrTreeView.Enabled = false; // Timer has now fired tmrTreeView.Enabled = false; // Timer has now fired
VETreeNode tn = tv.SelectedNode as VETreeNode; VETreeNode tn = tv.SelectedNode as VETreeNode;
if (tn != null) giveTvFocus = !SetupNodes(tn); if (tn != null) giveTvFocus = !SetupNodes(tn);
tv.Enabled = true; tv.Enabled = true;
if (giveTvFocus) tv.Focus(); if (giveTvFocus) tv.Focus();
_TimeActivity2.Close();
} }
private static VolianTimer _TimeActivity3 = new VolianTimer("frmVEPROMS.cs tmrAutomatic_Tick", 2711);
private void tmrAutomatic_Tick(object sender, EventArgs e) private void tmrAutomatic_Tick(object sender, EventArgs e)
{ {
_TimeActivity3.Open();
tmrAutomatic.Enabled = false; // Timer has now fired tmrAutomatic.Enabled = false; // Timer has now fired
RunAutomatic(); RunAutomatic();
_TimeActivity3.Close();
} }
private bool _ExpandingTree=false; private bool _ExpandingTree=false;
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e) private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)