From: AeonLucid Date: Thu, 22 Oct 2020 21:58:20 +0000 (+0200) Subject: Add stopwatch X-Git-Tag: v1.2.2~96^2~48 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=574b7e23b4a10e460b51c42fc365f57590ad28ff;p=rhonda%2Fimpostor.git Add stopwatch --- diff --git a/src/Impostor.Tools.ServerReplay/Program.cs b/src/Impostor.Tools.ServerReplay/Program.cs index adb9b19..7cc20fb 100644 --- a/src/Impostor.Tools.ServerReplay/Program.cs +++ b/src/Impostor.Tools.ServerReplay/Program.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net; using System.Threading.Tasks; @@ -42,10 +43,12 @@ namespace Impostor.Tools.ServerReplay private static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() - .MinimumLevel.Verbose() + .MinimumLevel.Information() .WriteTo.Console() .CreateLogger(); + var stopwatch = Stopwatch.StartNew(); + // Create service provider. _serviceProvider = BuildServices(); @@ -62,6 +65,10 @@ namespace Impostor.Tools.ServerReplay await ParseSession(reader); } } + + var elapsedMilliseconds = stopwatch.ElapsedMilliseconds; + + Logger.Information($"Took {elapsedMilliseconds}ms."); } private static ServiceProvider BuildServices()