<commit_before>﻿using System;
using Nohros.Extensions;

namespace Nohros.Metrics
{
  /// <summary>
  /// A <see cref="Tag"/> that contain informations about a
  /// <see cref="MetricType"/>.
  /// </summary>
  public static class MetricTypeTag
  {
    const string kDefaultName = "nohros.metrics.type";

    /// <summary>
    /// Creates a <see cref="Tag"/> by using  the string "nohros.metrics.type"
    /// as the tag name and the given <paramref name="type"/> as the tag value.
    /// </summary>
    /// <param name="type">
    /// A <see cref="MetricType"/> that defines the value of the tag.
    /// </param>
    public static Tag AsTag(this MetricType type) {
      return AsTag(type, kDefaultName);
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="MetricTypeTag"/> by using 
    /// the given <paramref name="name"/> as the tag name and the
    /// <paramref name="type"/> as the tag value.
    /// </summary>
    /// <param name="type">
    /// A <see cref="MetricType"/> that defines the value of the tag.
    /// </param><commit_msg>* Changed the default name for the metric type from nohros.metrics.type to type<commit_after>﻿using System;
using Nohros.Extensions;

namespace Nohros.Metrics
{
  /// <summary>
  /// A <see cref="Tag"/> that contain informations about a
  /// <see cref="MetricType"/>.
  /// </summary>
  public static class MetricTypeTag
  {
    const string kDefaultName = "type";

    /// <summary>
    /// Creates a <see cref="Tag"/> by using  the string "nohros.metrics.type"
    /// as the tag name and the given <paramref name="type"/> as the tag value.
    /// </summary>
    /// <param name="type">
    /// A <see cref="MetricType"/> that defines the value of the tag.
    /// </param>
    public static Tag AsTag(this MetricType type) {
      return AsTag(type, kDefaultName);
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="MetricTypeTag"/> by using 
    /// the given <paramref name="name"/> as the tag name and the
    /// <paramref name="type"/> as the tag value.
    /// </summary>
    /// <param name="type">
    /// A <see cref="MetricType"/> that defines the value of the tag.
    /// </param>
{'fraction_non_alphanumeric': 0.15976331360946747, 'fraction_numerical': 0.0, 'mean_word_length': 2.439749608763693, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '7148267', 'n_tokens_mistral': 659, 'n_tokens_neox': 652, 'n_words': 237}