Streamlined the profiling in the macro class.

This commit is contained in:
Shannon Deminick
2013-05-13 22:13:52 -10:00
parent 5890fe1849
commit e209aa3c2a
3 changed files with 67 additions and 50 deletions

View File

@@ -109,6 +109,11 @@ namespace Umbraco.Core
return TraceDuration(typeof(T), startMessage, completeMessage);
}
public static DisposableTimer TraceDuration<T>(string startMessage)
{
return TraceDuration(typeof(T), startMessage, "Complete");
}
/// <summary>
/// Adds a start and end log entry as Info and tracks how long it takes until disposed.
/// </summary>
@@ -136,6 +141,11 @@ namespace Umbraco.Core
return DebugDuration(typeof(T), startMessage, completeMessage);
}
public static DisposableTimer DebugDuration<T>(string startMessage)
{
return DebugDuration(typeof(T), startMessage, "Complete");
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>