Sha256: e95aa7a2f4db579206bc1aaa41c45079b7180ddbc41949acdea0fc282b372876

Contents?: true

Size: 889 Bytes

Versions: 2

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

require 'active_support/inflector'

module DiverDown
  module Trace
    require 'diver_down/trace/tracer'
    require 'diver_down/trace/tracer/session'
    require 'diver_down/trace/call_stack'
    require 'diver_down/trace/module_set'
    require 'diver_down/trace/redefine_ruby_methods'
    require 'diver_down/trace/ignored_method_ids'

    @trace_events = %i[
      call c_call return c_return
    ]

    # Trace only Ruby-implemented methods because tracing C-implemented methods is very slow
    # Override Ruby only with the minimal set of methods needed to trace dependencies.
    #
    # @return [void]
    def self.trace_only_ruby_world!(map = DiverDown::Trace::RedefineRubyMethods::DEFAULT_METHODS)
      DiverDown::Trace::Tracer.trace_events = %i[call return]
      DiverDown::Trace::RedefineRubyMethods.redefine_c_methods(map)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
diver_down-0.0.1.alpha2 lib/diver_down/trace.rb
diver_down-0.0.1.alpha1 lib/diver_down/trace.rb