diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 7da11e5e..ebd84387 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -6,7 +6,9 @@ todo: enable response compression https://www.infoworld.com/article/3256012/how-to-use-response-compression-in-aspnet-core.html - +todo: tag refcount + Move this into a procedure, it's apparently quite slow now that I can see the metrics + TODO: Why is this adding UTC bit to this query check the source code maybe something is up Schema settings mean that pg will ignore any tz specification so in theory it's ignored, but... diff --git a/server/AyaNova/AyaNova.csproj b/server/AyaNova/AyaNova.csproj index 839328b0..bdd8e16b 100644 --- a/server/AyaNova/AyaNova.csproj +++ b/server/AyaNova/AyaNova.csproj @@ -30,7 +30,8 @@ all - + + diff --git a/server/AyaNova/Startup.cs b/server/AyaNova/Startup.cs index c2cd88ff..3ff4376a 100644 --- a/server/AyaNova/Startup.cs +++ b/server/AyaNova/Startup.cs @@ -63,9 +63,18 @@ namespace AyaNova _newLog.LogDebug("Initializing services..."); + _newLog.LogDebug("Profiler"); + //https://dotnetthoughts.net/using-miniprofiler-in-aspnetcore-webapi/ + services.AddMemoryCache(); + services.AddMiniProfiler(options => + { + options.RouteBasePath = "/profiler"; + + }).AddEntityFramework(); + //Server state service for shutting people out of api - _newLog.LogDebug("ApiServerState"); + _newLog.LogDebug("ServerState service"); services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState()); //Init controllers @@ -289,7 +298,7 @@ namespace AyaNova #endregion - + _newLog.LogDebug("Generator"); services.AddSingleton();