mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 17:47:08 +00:00
Miniprofiler is only enabled in production.
This commit is contained in:
parent
6f9aaa1145
commit
becd8e2dac
1 changed files with 8 additions and 5 deletions
|
@ -4,6 +4,8 @@
|
||||||
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 @@ public void Init(HttpApplication context)
|
||||||
//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(); }
|
||||||
MiniProfiler.Start();
|
|
||||||
|
if (!EnviromentProvider.IsProduction)
|
||||||
|
{
|
||||||
|
MiniProfiler.Start();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,10 +87,7 @@ public void Init(HttpApplication context)
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
context.EndRequest += (sender, e) =>
|
context.EndRequest += (sender, e) => MiniProfiler.Stop();
|
||||||
{
|
|
||||||
MiniProfiler.Stop();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() { }
|
public void Dispose() { }
|
||||||
|
|
Loading…
Reference in a new issue