Skip to content

Commit

Permalink
BackStageView: add timing to debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Feb 2, 2018
1 parent 56fb26f commit 623ab5b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ExtLibs/Controls/BackstageView/BackstageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ public void ActivatePage(BackstageViewPage associatedPage)

Tracking?.Invoke(associatedPage.Page.GetType().ToString(), associatedPage.LinkText);

var start = DateTime.Now;

this.SuspendLayout();
associatedPage.Page.SuspendLayout();

Expand Down Expand Up @@ -512,6 +514,11 @@ public void ActivatePage(BackstageViewPage associatedPage)
log.Error(ex);
}

var end = DateTime.Now;

log.DebugFormat("{0} {1} {2}", associatedPage.Page.GetType().ToString(), associatedPage.LinkText,
(end - start).TotalMilliseconds);

_activePage = associatedPage;
}

Expand Down

0 comments on commit 623ab5b

Please sign in to comment.