[backend/startup] Log initialization time during startup

This commit is contained in:
Laura Hausmann 2024-11-14 19:18:29 +01:00
parent 1200bcbba5
commit 59d14297a3
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1,3 +1,4 @@
using System.Diagnostics;
using Iceshrimp.Backend.Core.Extensions;
using Iceshrimp.Backend.Core.Helpers;
using Iceshrimp.Backend.Pages.Shared;
@ -87,6 +88,8 @@ if (!app.Urls.IsReadOnly)
app.Urls.Add($"{(args.Contains("--https") ? "https" : "http")}://{config.ListenHost}:{config.ListenPort}");
}
var elapsed = (DateTime.Now - Process.GetCurrentProcess().StartTime).GetTotalMilliseconds();
app.Logger.LogInformation("Startup complete after {ms} ms.", elapsed);
await app.StartAsync();
app.SetKestrelUnixSocketPermissions();
await app.WaitForShutdownAsync();