<commit_before>require File.expand_path("../performance", __FILE__)
require "benchmark"

job = LevenshteinJob.new
job.warm_up

Benchmark.benchmark do |b|
  b.report("Levenshtein"){ job.run_with_no_max }
  b.report("Levenshtein (max 1)"){ job.run_with_max 1 }
  b.report("Levenshtein (max 2)"){ job.run_with_max 2 }
  b.report("Levenshtein (max 4)"){ job.run_with_max 4 }
  b.report("Levenshtein (max 8)"){ job.run_with_max 8 }
end<commit_msg>Make benchmarking output prettier<commit_after>require File.expand_path("../performance", __FILE__)
require "benchmark"

job = LevenshteinJob.new
job.warm_up

Benchmark.benchmark do |b|
  b.report("Levenshtein (no max)"){ job.run_with_no_max }
  b.report("Levenshtein (max 1) "){ job.run_with_max 1 }
  b.report("Levenshtein (max 2) "){ job.run_with_max 2 }
  b.report("Levenshtein (max 4) "){ job.run_with_max 4 }
  b.report("Levenshtein (max 8) "){ job.run_with_max 8 }
end
{'fraction_non_alphanumeric': 0.1504907306434024, 'fraction_numerical': 0.017448200654307525, 'mean_word_length': 5.287671232876712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4287419', 'n_tokens_mistral': 414, 'n_tokens_neox': 364, 'n_words': 72}