<commit_before>$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require 'wurfl/loader'
require 'benchmark'

loader = Wurfl::Loader.new
r = Benchmark.measure do
  loader.load_wurfl(File.join(File.dirname(__FILE__), "data", "wurfl.large.xml"))
end
puts r<commit_msg>Fix so that benchmark isn't run when required<commit_after>$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require 'wurfl/loader'
require 'benchmark'

if $0 == __FILE__
  loader = Wurfl::Loader.new
  r = Benchmark.measure do
    loader.load_wurfl(File.join(File.dirname(__FILE__), "data", "wurfl.large.xml"))
  end
  puts r
end
{'fraction_non_alphanumeric': 0.16233766233766234, 'fraction_numerical': 0.0016233766233766235, 'mean_word_length': 5.494736842105263, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6391877', 'n_tokens_mistral': 232, 'n_tokens_neox': 226, 'n_words': 46}