<commit_before>require 'net_observer/base'
require 'net/http'

module Net
  class HTTP
    alias_method :orig_request, :request

		# hook into net code to get request and response for it
    def request(req, body = nil, &block)  # :yield: +response+<commit_msg>fix double logging if connection is not set yet<commit_after>require 'net_observer/base'
require 'net/http'

module Net
  class HTTP
    alias_method :orig_request, :request

		# hook into net code to get request and response for it
    def request(req, body = nil, &block)  # :yield: +response+
      return orig_request req, body, &block unless started? #if not started don't log twice
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 4.233870967741935, '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': '2453213', 'n_tokens_mistral': 199, 'n_tokens_neox': 189, 'n_words': 78}