From 574b7e23b4a10e460b51c42fc365f57590ad28ff Mon Sep 17 00:00:00 2001 From: AeonLucid Date: Thu, 22 Oct 2020 23:58:20 +0200 Subject: [PATCH] Add stopwatch --- src/Impostor.Tools.ServerReplay/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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() -- 2.39.5