class Vernier::Hooks::ActiveSupport

def disable

def disable
  ::ActiveSupport::Notifications.unsubscribe(@subscription)
  @subscription = nil
end

def enable

def enable
  require "active_support"
  @subscription = ::ActiveSupport::Notifications.monotonic_subscribe(/\A[^!]/) do |name, start, finish, id, payload|
    # Notifications.publish API may reach here without proper timing information included
    unless Float === start && Float === finish
      next
    end
    data = { type: name }
    if keys = SERIALIZED_KEYS[name]
      keys.each do |key|
        data[key] = payload[key]
      end
    end
    @collector.add_marker(
      name: name,
      start: (start * 1_000_000_000.0).to_i,
      finish: (finish * 1_000_000_000.0).to_i,
      data: data
    )
  end
end

def firefox_marker_schema

def firefox_marker_schema
  FIREFOX_MARKER_SCHEMA
end

def initialize(collector)

def initialize(collector)
  @collector = collector
end