<commit_before># encoding: utf-8

RSpec.describe RSpec::Benchmark, '#format_time' do
  {
    1e-10   => "0 ns",
    0.42e-6 => "420 ns",
    3.4e-6  => "3.4 μs",
    34e-6   => "34 μs",
    340e-6  => "340 μs",
    1e-3    => "1 ms",
    12e-3   => "12 ms",
    1.0     => "1 sec",
    1.2345  => "1.23 sec",
    123.45  => "123 sec",
    1234    => "1234 sec"
  }.each do |input, expected|
    it "#{input} -> #{expected}" do
      expect(described_class.format_time(input)).to eq(expected)
    end
  end
end<commit_msg>Add more test cases to ensure correct behaviour<commit_after># frozen_string_literal: true

RSpec.describe RSpec::Benchmark, "#format_time" do
  {
    1e-10   => "0 ns",
    0.42e-6 => "420 ns",
    # us
    3.4e-6  => "3.4 μs",
    34e-6   => "34 μs",
    340e-6  => "340 μs",
    # ms
    0.001   => "1 ms",
    0.0123  => "12.3 ms",
    0.123   => "123 ms",
    0.1     => "100 ms",
    # sec
    1.0     => "1 sec",
    1.2345  => "1.23 sec",
    12.123  => "12.1 sec",
    123.45  => "123 sec",
    1234    => "1234 sec",
    1234.56 => "1235 sec"
  }.each do |input, expected|
    it "#{input} -> #{expected}" do
      expect(described_class.format_time(input)).to eq(expected)
    end
  end
end
{'fraction_non_alphanumeric': 0.19476268412438624, 'fraction_numerical': 0.132569558101473, 'mean_word_length': 1.9975490196078431, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '1757498', 'n_tokens_mistral': 596, 'n_tokens_neox': 511, 'n_words': 127}