Miniprofiler is only enabled in production.

pull/2/head
kay.one 13 years ago
parent 6f9aaa1145
commit becd8e2dac

@ -4,6 +4,8 @@ using System.Linq;
using MvcMiniProfiler; using MvcMiniProfiler;
using MvcMiniProfiler.MVCHelpers; using MvcMiniProfiler.MVCHelpers;
using Microsoft.Web.Infrastructure.DynamicModuleHelper; using Microsoft.Web.Infrastructure.DynamicModuleHelper;
using NzbDrone.Common;
//using System.Data; //using System.Data;
//using System.Data.Entity; //using System.Data.Entity;
//using System.Data.Entity.Infrastructure; //using System.Data.Entity.Infrastructure;
@ -66,7 +68,11 @@ namespace NzbDrone.Web.App_Start
//TODO: By default only local requests are profiled, optionally you can set it up //TODO: By default only local requests are profiled, optionally you can set it up
// so authenticated users are always profiled // so authenticated users are always profiled
//if (request.IsLocal) { MiniProfiler.Start(); } //if (request.IsLocal) { MiniProfiler.Start(); }
if (!EnviromentProvider.IsProduction)
{
MiniProfiler.Start(); MiniProfiler.Start();
}
}; };
@ -81,10 +87,7 @@ namespace NzbDrone.Web.App_Start
}; };
*/ */
context.EndRequest += (sender, e) => context.EndRequest += (sender, e) => MiniProfiler.Stop();
{
MiniProfiler.Stop();
};
} }
public void Dispose() { } public void Dispose() { }

Loading…
Cancel
Save