Fixing list command (#218)
authorSung Yoon Whang <suwhang@microsoft.com>
Mon, 29 Apr 2019 22:05:22 +0000 (15:05 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2019 22:05:22 +0000 (15:05 -0700)
src/Tools/dotnet-counters/Program.cs

index 9529a0ae9363bfc6046f708e7aad3b1bb198052c..762e277bdaf07f2f1dc1d7df793795610d7a6c0f 100644 (file)
@@ -58,12 +58,12 @@ namespace Microsoft.Diagnostics.Tools.Counters
         {
             var profiles = KnownData.GetAllProviders();
             var maxNameLength = profiles.Max(p => p.Name.Length);
-            Console.WriteLine(maxNameLength);
             Console.WriteLine("Showing well-known counters only. Specific processes may support additional counters.\n");
             foreach (var profile in profiles)
             {
                 var counters = profile.GetAllCounters();
                 var maxCounterNameLength = counters.Max(c => c.Name.Length);
+                Console.WriteLine($"{profile.Name.PadRight(maxNameLength)}");
                 foreach (var counter in profile.Counters.Values)
                 {
                     Console.WriteLine($"    {counter.Name.PadRight(maxCounterNameLength)} \t\t {counter.Description}");