<commit_before>﻿
using System;
namespace Metrics.PerfCounters
{
    public abstract class BaseCounterRegristry
    {
        protected const string TotalInstance = "_Total";
        protected const string GlobalInstance = "_Global_";

        private readonly string prefix;
        private readonly MetricsRegistry registry;

        public BaseCounterRegristry(MetricsRegistry registry, string prefix)
        {
            this.registry = registry;
            this.prefix = prefix;
        }

        protected void Register(string name, Func<Gauge> gauge, Unit unit)
        {
            this.registry.Gauge(prefix + "." + name, gauge, unit);
        }

        protected void Register(string name, Func<string> value)
        {
            Register(name, value, Unit.None);
        }

        protected void Register(string name, Func<float> value, Unit unit)
        {
            Register(name, () => value().ToString("F"), unit);
        }

        protected void Register(string name, Func<string> value, Unit unit)
        {
            this.registry.Gauge(prefix + "." + name, value, unit);
        }
    }
}
<commit_msg>mark constructor of abstract class protected<commit_after>﻿
using System;
namespace Metrics.PerfCounters
{
    public abstract class BaseCounterRegristry
    {
        protected const string TotalInstance = "_Total";
        protected const string GlobalInstance = "_Global_";

        private readonly string prefix;
        private readonly MetricsRegistry registry;

        protected BaseCounterRegristry(MetricsRegistry registry, string prefix)
        {
            this.registry = registry;
            this.prefix = prefix;
        }

        protected void Register(string name, Func<Gauge> gauge, Unit unit)
        {
            this.registry.Gauge(prefix + "." + name, gauge, unit);
        }

        protected void Register(string name, Func<string> value)
        {
            Register(name, value, Unit.None);
        }

        protected void Register(string name, Func<float> value, Unit unit)
        {
            Register(name, () => value().ToString("F"), unit);
        }

        protected void Register(string name, Func<string> value, Unit unit)
        {
            this.registry.Gauge(prefix + "." + name, value, unit);
        }
    }
}

{'fraction_non_alphanumeric': 0.09383145091225022, 'fraction_numerical': 0.0, 'mean_word_length': 2.180939226519337, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2360388', 'n_tokens_mistral': 590, 'n_tokens_neox': 573, 'n_words': 165}