Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit 158f127

Browse files
committed
Removed the DEBUG compiler check from the profiler
1 parent 9922e92 commit 158f127

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Our.Umbraco.Ditto/Common/DittoDisposableTimer.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ public static DisposableTimer DebugDuration<T>(string startMessage)
2727
/// <returns>Returns an instance of the disposable timer.</returns>
2828
public static DisposableTimer DebugDuration(Type loggerType, string startMessage)
2929
{
30-
#if DEBUG
31-
if (Ditto.IsProfilingEnabled() && ApplicationContext.Current?.ProfilingLogger != null)
30+
if (Ditto.IsDebuggingEnabled && Ditto.IsProfilingEnabled() && ApplicationContext.Current?.ProfilingLogger != null)
3231
{
3332
return ApplicationContext.Current.ProfilingLogger.DebugDuration(loggerType, startMessage, "Complete");
3433
}
35-
#endif
34+
3635
return default(DisposableTimer);
3736
}
3837
}

src/Our.Umbraco.Ditto/Ditto.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ internal static bool GetDebugFlag()
8181
/// </summary>
8282
internal static bool IsProfilingEnabled()
8383
{
84-
if (IsDebuggingEnabled == false)
85-
return false;
86-
8784
var qs = HttpContext.Current?.Request?.QueryString?["umbDebug"];
8885
if (string.IsNullOrWhiteSpace(qs) == false && bool.TryParse(qs, out bool umbDebug))
8986
{

0 commit comments

Comments
 (0)