]> git.deb.at Git - rhonda/impostor.git/commitdiff
Add stopwatch
authorAeonLucid <aeonlucid@outlook.com>
Thu, 22 Oct 2020 21:58:20 +0000 (23:58 +0200)
committerAeonLucid <aeonlucid@outlook.com>
Thu, 22 Oct 2020 21:58:20 +0000 (23:58 +0200)
src/Impostor.Tools.ServerReplay/Program.cs

index adb9b191f23f364ff4da269ad6d487c342226baf..7cc20fb175bd2159bb0fbd9daf30f7a676d0789e 100644 (file)
@@ -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()