<commit_before>﻿
using System;
using Metrics.Core;
namespace Metrics.PerfCounters
{
    public class SystemInfo : BaseCounterRegristry
    {
        public SystemInfo(MetricsRegistry registry, string prefix)
            : base(registry, prefix) { }

        public void Register()
        {
            //Register("MachineName", () => Environment.MachineName);
            //Register("Processor Count", () => Environment.ProcessorCount.ToString());
            //Register("OperatingSystem", () => GetOSVersion());
            //Register("NETVersion", () => Environment.Version.ToString());
            //Register("CommandLine", () => Environment.CommandLine.Replace("\"",string.Empty).Replace("\\","/"));

            Register("AvailableRAM", () => new PerformanceCounterGauge("Memory", "Available MBytes"), Unit.Custom("Mb"));
            Register("CPU Usage", () => new PerformanceCounterGauge("Processor", "% Processor Time", TotalInstance), Unit.Custom("%"));
            Register("Disk Writes/sec", () => new DerivedGauge(new PerformanceCounterGauge("PhysicalDisk", "Disk Reads/sec", TotalInstance), f => f / 1024), Unit.Custom("kb/s"));
            Register("Disk Reads/sec", () => new DerivedGauge(new PerformanceCounterGauge("PhysicalDisk", "Disk Writes/sec", TotalInstance), f => f / 1024), Unit.Custom("kb/s"));
        }

        private static string GetOSVersion()
        {
            return string.Format("{0} {1}", Environment.OSVersion.VersionString, Environment.Is64BitOperatingSystem ? "64bit" : "32bit");
        }
    }
}<commit_msg>remove old system info string gauges<commit_after>﻿
using System;
using Metrics.Core;
namespace Metrics.PerfCounters
{
    public class SystemInfo : BaseCounterRegristry
    {
        public SystemInfo(MetricsRegistry registry, string prefix)
            : base(registry, prefix) { }

        public void Register()
        {
            Register("AvailableRAM", () => new PerformanceCounterGauge("Memory", "Available MBytes"), Unit.Custom("Mb"));
            Register("CPU Usage", () => new PerformanceCounterGauge("Processor", "% Processor Time", TotalInstance), Unit.Custom("%"));
            Register("Disk Writes/sec", () => new DerivedGauge(new PerformanceCounterGauge("PhysicalDisk", "Disk Reads/sec", TotalInstance), f => f / 1024), Unit.Custom("kb/s"));
            Register("Disk Reads/sec", () => new DerivedGauge(new PerformanceCounterGauge("PhysicalDisk", "Disk Writes/sec", TotalInstance), f => f / 1024), Unit.Custom("kb/s"));
        }
    }
}
{'fraction_non_alphanumeric': 0.15871121718377088, 'fraction_numerical': 0.00954653937947494, 'mean_word_length': 3.435626102292769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, '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': '4610784', 'n_tokens_mistral': 680, 'n_tokens_neox': 645, 'n_words': 145}