Skip to content

Commit

Permalink
Fix dotnet-counters console alignment
Browse files Browse the repository at this point in the history
Text was oddly shifting one character to the right during
updates. Fixed the off-by-one error in the update text
positioning.
  • Loading branch information
noahfalk committed Aug 6, 2021
1 parent e0cd43a commit 5a6227b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ public void AssignRowsAndInitializeDisplay()
counter.Row = row++;
if (counter.RenderValueInline)
{
Console.WriteLine($"{name}{FormatValue(counter.LastValue)}");
Console.WriteLine($"{name} {FormatValue(counter.LastValue)}");
}
else
{
Console.WriteLine(name);
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++;
}
}
Expand Down

0 comments on commit 5a6227b

Please sign in to comment.