This commit is contained in:
2020-05-30 20:31:20 +00:00
parent 7f7b5c3ac2
commit be77138403
3 changed files with 16 additions and 4 deletions

View File

@@ -6,6 +6,8 @@
todo: enable response compression todo: enable response compression
https://www.infoworld.com/article/3256012/how-to-use-response-compression-in-aspnet-core.html 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 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... Schema settings mean that pg will ignore any tz specification so in theory it's ignored, but...

View File

@@ -30,7 +30,8 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.OpenApi" Version="1.1.4" /> <PackageReference Include="Microsoft.OpenApi" Version="1.1.4" />
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.1.0" /> <PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.1.0" />
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.1.0" />
<PackageReference Include="NLog" Version="4.6.7" /> <PackageReference Include="NLog" Version="4.6.7" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" /> <PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" />

View File

@@ -63,9 +63,18 @@ namespace AyaNova
_newLog.LogDebug("Initializing services..."); _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 //Server state service for shutting people out of api
_newLog.LogDebug("ApiServerState"); _newLog.LogDebug("ServerState service");
services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState()); services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState());
//Init controllers //Init controllers