<commit_before>﻿
namespace Metrics
{
    /// <summary>
    /// Indicates the ability to provide the value for a metric.
    /// This is the raw value. Consummers should use <see cref="MetricValueSource{T}"/>
    /// </summary>
    /// <typeparam name="T">Type of the value returned by the metric</typeparam>
    public interface MetricValueProvider<T> : Utils.IHideObjectMembers where T : struct
    {
        /// <summary>
        /// The current value of the metric.
        /// </summary>
        T Value { get; }
    }

    /// <summary>
    /// Provides the value of a metric and information about units.
    /// This is the class that metric consummers should use.
    /// </summary>
    /// <typeparam name="T">Type of the metric value</typeparam>
    public abstract class MetricValueSource<T> : Utils.IHideObjectMembers
        where T : struct
    {
        private readonly MetricValueProvider<T> value;

        protected MetricValueSource(string name, MetricValueProvider<T> value, Unit unit)
        {
            this.Name = name;
            this.Unit = unit;
            this.value = value;
        }

        /// <summary>
        /// Name of the metric.
        /// </summary>
        public string Name { get; private set; }
<commit_msg>fix typo<commit_after>﻿
namespace Metrics
{
    /// <summary>
    /// Indicates the ability to provide the value for a metric.
    /// This is the raw value. Consumers should use <see cref="MetricValueSource{T}"/>
    /// </summary>
    /// <typeparam name="T">Type of the value returned by the metric</typeparam>
    public interface MetricValueProvider<T> : Utils.IHideObjectMembers where T : struct
    {
        /// <summary>
        /// The current value of the metric.
        /// </summary>
        T Value { get; }
    }

    /// <summary>
    /// Provides the value of a metric and information about units.
    /// This is the class that metric consumers should use.
    /// </summary>
    /// <typeparam name="T">Type of the metric value</typeparam>
    public abstract class MetricValueSource<T> : Utils.IHideObjectMembers
        where T : struct
    {
        private readonly MetricValueProvider<T> value;

        protected MetricValueSource(string name, MetricValueProvider<T> value, Unit unit)
        {
            this.Name = name;
            this.Unit = unit;
            this.value = value;
        }

        /// <summary>
        /// Name of the metric.
        /// </summary>
        public string Name { get; private set; }

{'fraction_non_alphanumeric': 0.11408057439170323, 'fraction_numerical': 0.0, 'mean_word_length': 1.9928400954653938, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '7297660', 'n_tokens_mistral': 680, 'n_tokens_neox': 672, 'n_words': 233}