<commit_before>module BME
  class IFindHelpersForRequest
    def initialize requests_helper
      @request_helper = requests_helper
    end

    def start request
      Thread.new{find_helpers_for_request request}
    end

    def find_helpers_for_request request
      10.times do
        TheLogger.log.info "thread finding helpers for request #{request}"
        @requests_helper.check_request request, 1
        sleep 4 # seconds
      end
    end
  end
end<commit_msg>time how long it takes to find helper<commit_after>module BME
  class Timer
    def self.time(&block)
      start_time = Time.now
      result = block.call
      end_time = Time.now
      @time_taken = end_time - start_time
      result
    end

    def self.elapsedTime
      return @time_taken
    end

  end

  class IFindHelpersForRequest
    def initialize requests_helper
      @request_helper = requests_helper
    end

    def start request
      Thread.new{find_helpers_for_request request}
    end

    def find_helpers_for_request request
      10.times do
        TheLogger.log.info "thread finding helpers for request #{request}"
        Timer.time {@requests_helper.check_request request, 1}
        TheLogger.log.info "finished finding helpers time elapsed: #{Timer.elapsedTime}"
        sleep 4 # seconds
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.05075757575757576, 'fraction_numerical': 0.006060606060606061, 'mean_word_length': 2.6391184573002753, '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': '2255422', 'n_tokens_mistral': 386, 'n_tokens_neox': 373, 'n_words': 111}