<commit_before>-module(prometheus_http_tests).

-include_lib("eunit/include/eunit.hrl").

microseconds_duration_buckets_test() ->
  ?assertMatch([10, 100, 1000, 10000, 100000, 300000, 500000,
                750000, 1000000, 1500000, 2000000, 3000000], prometheus_http:microseconds_duration_buckets()).

status_class_test() ->
  ?assertMatch("unknown", prometheus_http:status_class(655)), %% FIXME: s/665/65
  ?assertMatch("informational", prometheus_http:status_class(155)),
  ?assertMatch("success", prometheus_http:status_class(255)),
  ?assertMatch("redirection", prometheus_http:status_class(355)),
  ?assertMatch("client-error", prometheus_http:status_class(455)),
  ?assertMatch("server-error", prometheus_http:status_class(565)),
  ?assertMatch("unknown", prometheus_http:status_class(655)).
<commit_msg>fix prometheus_http:status_class test<commit_after>-module(prometheus_http_tests).

-include_lib("eunit/include/eunit.hrl").

microseconds_duration_buckets_test() ->
  ?assertMatch([10, 100, 1000, 10000, 100000, 300000, 500000,
                750000, 1000000, 1500000, 2000000, 3000000], prometheus_http:microseconds_duration_buckets()).

status_class_test() ->
  ?assertMatch("unknown", prometheus_http:status_class(65)),
  ?assertMatch("informational", prometheus_http:status_class(155)),
  ?assertMatch("success", prometheus_http:status_class(255)),
  ?assertMatch("redirection", prometheus_http:status_class(355)),
  ?assertMatch("client-error", prometheus_http:status_class(455)),
  ?assertMatch("server-error", prometheus_http:status_class(565)),
  ?assertMatch("unknown", prometheus_http:status_class(655)).

{'fraction_non_alphanumeric': 0.14742014742014742, 'fraction_numerical': 0.10933660933660934, 'mean_word_length': 8.58235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5002497', 'n_tokens_mistral': 692, 'n_tokens_neox': 514, 'n_words': 66}