-
-
Save rolfbjarne/87a09825dffe9c415183582c74934cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 7fa8911565c920ea3d1547cb2183613cf3c7c372 | |
Author: Rolf Bjarne Kvinge <rolf@xamarin.com> | |
Date: Thu May 25 09:43:48 2023 +0200 | |
Add timestamp logging. | |
diff --git a/src/StructuredLogger/BinaryLogger/BinLogReader.cs b/src/StructuredLogger/BinaryLogger/BinLogReader.cs | |
index b9a0382..3712208 100644 | |
--- a/src/StructuredLogger/BinaryLogger/BinLogReader.cs | |
+++ b/src/StructuredLogger/BinaryLogger/BinLogReader.cs | |
@@ -89,6 +89,7 @@ namespace Microsoft.Build.Logging.StructuredLogger | |
var streamLength = stream.Length; | |
+ var allWatch = Stopwatch.StartNew(); | |
while (true) | |
{ | |
BuildEventArgs instance = null; | |
@@ -131,6 +132,9 @@ namespace Microsoft.Build.Logging.StructuredLogger | |
} | |
} | |
+ var elapsedAll = allWatch.Elapsed; | |
+ Console.WriteLine($"Read {recordsRead} records in {elapsedAll} = {elapsedAll.TotalMilliseconds} ms"); | |
+ | |
if (progress != null) | |
{ | |
progress.Report(1.0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment