<commit_before>module Marked
  def mark *objects

    Marked.log "\nMARKED #{caller.first.split(':in ').first}"

    returnable = if block_given?
      require 'benchmark'
      result = nil
      bench = Benchmark.measure { result = yield }
      Marked.print_benchmark bench
      result
    else
      objects.last
    end

    objects.each do |object|
      Marked.log Marked.pad object
    end

    if block_given?
      Marked.log Marked.pad returnable
    end<commit_msg>moving execution benchmark print down<commit_after>module Marked
  def mark *objects

    Marked.log "\nMARKED #{caller.first.split(':in ').first}"

    returnable = if block_given?
      require 'benchmark'
      result = nil
      bench = Benchmark.measure { result = yield }
      result
    else
      objects.last
    end

    objects.each do |object|
      Marked.log Marked.pad object
    end

    Marked.log Marked.pad returnable if block_given?

    Marked.print_benchmark bench if result
{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.0, 'mean_word_length': 2.473309608540925, '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': '2168869', 'n_tokens_mistral': 309, 'n_tokens_neox': 291, 'n_words': 82}