<commit_before>﻿using System;
using System.Diagnostics;
using System.Linq;

namespace Graphite.System
{
    internal static class Explorer
    {
        public static void Print(string[] path)
        {
            string[] filteredPath = path == null
                ? new string[0]
                : path.Where(s => !string.IsNullOrWhiteSpace(s)).Select(s => UnQuote(s)).ToArray();

            if (filteredPath.Length == 0)
            {
                Console.WriteLine("Categories:");

                var categories = PerformanceCounterCategory.GetCategories();

                string intend = new string(' ', 4);
                foreach (var category in categories)
                {
                    Console.WriteLine(intend + category.CategoryName);
                }
            }
            else
            {
                PerformanceCounterCategory category = FindCategory(filteredPath[0]);

                if (category == null)
                {
                    Console.WriteLine("Unkown category: " + filteredPath[0]);
                }
                else
                {
                    Console.WriteLine("Category: " + category.CategoryName);

                    if (filteredPath.Length == 1)<commit_msg>Order categories by name<commit_after>﻿using System;
using System.Diagnostics;
using System.Linq;

namespace Graphite.System
{
    internal static class Explorer
    {
        public static void Print(string[] path)
        {
            string[] filteredPath = path == null
                ? new string[0]
                : path.Where(s => !string.IsNullOrWhiteSpace(s)).Select(s => UnQuote(s)).ToArray();

            if (filteredPath.Length == 0)
            {
                Console.WriteLine("Categories:");

                var categories = PerformanceCounterCategory.GetCategories().OrderBy(c => c.CategoryName);

                string intend = new string(' ', 4);
                foreach (var category in categories)
                {
                    Console.WriteLine(intend + category.CategoryName);
                }
            }
            else
            {
                PerformanceCounterCategory category = FindCategory(filteredPath[0]);

                if (category == null)
                {
                    Console.WriteLine("Unkown category: " + filteredPath[0]);
                }
                else
                {
                    Console.WriteLine("Category: " + category.CategoryName);

                    if (filteredPath.Length == 1)
{'fraction_non_alphanumeric': 0.09738717339667459, 'fraction_numerical': 0.004750593824228029, 'mean_word_length': 1.4533980582524273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2118109', 'n_tokens_mistral': 616, 'n_tokens_neox': 554, 'n_words': 125}