From: Stephen Toub Date: Wed, 17 Jul 2019 21:53:30 +0000 (-0400) Subject: Change HttpStress app to highlight in red unchanged totals (dotnet/corefx#39576) X-Git-Tag: submit/tizen/20210909.063632~11031^2~898 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d52a171d83fa07ddeb3fc0afeecc548fadb49c42;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Change HttpStress app to highlight in red unchanged totals (dotnet/corefx#39576) When no additional operations have completed since the last time status was output, highlight that in red. Commit migrated from https://github.com/dotnet/corefx/commit/53dc908890102d3a888ba603a06266b85d3f4a9b --- diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs index d1b0a2d..6d396d5 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs @@ -537,6 +537,7 @@ public class Program // Spin up a thread dedicated to outputting stats for each defined interval new Thread(() => { + long lastTotal = 0; while (true) { Thread.Sleep(DisplayIntervalMilliseconds); @@ -545,7 +546,14 @@ public class Program Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("[" + DateTime.Now + "]"); Console.ResetColor(); + + if (lastTotal == total) + { + Console.ForegroundColor = ConsoleColor.Red; + } + lastTotal = total; Console.WriteLine(" Total: " + total.ToString("N0")); + Console.ResetColor(); if (reuseAddressFailure > 0) {