From: Noah Falk Date: Sat, 7 Aug 2021 00:50:18 +0000 (-0700) Subject: Fix dotnet-counters console alignment (#2485) X-Git-Tag: submit/tizen/20220302.040122~21^2^2~167 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f15cc67105068c47743e8719c0e131dac9abb83;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Fix dotnet-counters console alignment (#2485) Text was oddly shifting one character to the right during updates. Fixed the off-by-one error in the update text positioning. --- diff --git a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs index c1c36f154..de578d503 100644 --- a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs +++ b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs @@ -114,7 +114,7 @@ namespace Microsoft.Diagnostics.Tools.Counters.Exporters counter.Row = row++; if (counter.RenderValueInline) { - Console.WriteLine($"{name}{FormatValue(counter.LastValue)}"); + Console.WriteLine($"{name} {FormatValue(counter.LastValue)}"); } else { @@ -122,7 +122,7 @@ namespace Microsoft.Diagnostics.Tools.Counters.Exporters foreach (ObservedTagSet tagSet in counter.TagSets.Values.OrderBy(t => t.Tags)) { string tagName = MakeFixedWidth($"{new string(' ', 2 * Indent)}{tagSet.Tags}", Indent + maxNameLength); - Console.WriteLine($"{tagName}{FormatValue(tagSet.LastValue)}"); + Console.WriteLine($"{tagName} {FormatValue(tagSet.LastValue)}"); tagSet.Row = row++; } }