From d52a171d83fa07ddeb3fc0afeecc548fadb49c42 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Jul 2019 17:53:30 -0400 Subject: [PATCH] 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 --- .../System.Net.Http/tests/StressTests/HttpStress/Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- 2.7.4