<commit_before>module Travis
  module LogSubscriber
    class ActiveRecordMetrics < ActiveSupport::LogSubscriber
      def sql(event)
        return if 'SCHEMA' == event[:name]
        name, sql, duration = event[:name], event[:sql], event.duration<commit_msg>Use the event's payload to get the proper values.<commit_after>module Travis
  module LogSubscriber
    class ActiveRecordMetrics < ActiveSupport::LogSubscriber
      def sql(event)
        return if 'SCHEMA' == event.payload[:name]
        name, sql, duration = event.payload[:name], event.payload[:sql], event.duration
{'fraction_non_alphanumeric': 0.10172413793103448, 'fraction_numerical': 0.0, 'mean_word_length': 4.1415929203539825, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6196242', 'n_tokens_mistral': 157, 'n_tokens_neox': 153, 'n_words': 45}