From 5a6227b951c142dbd6f0a0f24321d1e1d3843f6c Mon Sep 17 00:00:00 2001 From: Noah Falk Date: Fri, 6 Aug 2021 01:40:12 -0700 Subject: [PATCH] Fix dotnet-counters console alignment Text was oddly shifting one character to the right during updates. Fixed the off-by-one error in the update text positioning. --- src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs index c1c36f1543..de578d5035 100644 --- a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs +++ b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs @@ -114,7 +114,7 @@ public void AssignRowsAndInitializeDisplay() counter.Row = row++; if (counter.RenderValueInline) { - Console.WriteLine($"{name}{FormatValue(counter.LastValue)}"); + Console.WriteLine($"{name} {FormatValue(counter.LastValue)}"); } else { @@ -122,7 +122,7 @@ public void AssignRowsAndInitializeDisplay() 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++; } }