class TestProf::RubyProf::Configuration

RubyProf configuration

def exclude_common_methods?

def exclude_common_methods?
  exclude_common_methods == true
end

def include_threads?

def include_threads?
  include_threads == true
end

def initialize

def initialize
  @printer = ENV["TEST_RUBY_PROF"].to_sym if PRINTERS.key?(ENV["TEST_RUBY_PROF"])
  @printer ||= ENV.fetch("TEST_RUBY_PROF_PRINTER", :flat).to_sym
  @mode = ENV.fetch("TEST_RUBY_PROF_MODE", :wall).to_s
  @skip_boot = %w[0 false f].include?(ENV["TEST_RUBY_PROF_BOOT"])
  @min_percent = 1
  @include_threads = false
  @exclude_common_methods = true
  @test_prof_exclusions_enabled = true
  @custom_exclusions = {}
end

def resolve_printer

Returns an array of printer type (ID) and class.
def resolve_printer
  return ["custom", printer] if printer.is_a?(Module)
  type = printer.to_s
  raise ArgumentError, "Unknown printer: #{type}" unless
    PRINTERS.key?(type)
  [type, ::RubyProf.const_get(PRINTERS[type])]
end

def ruby_prof_mode

Based on deprecated https://github.com/ruby-prof/ruby-prof/blob/fd3a5236a459586c5ca7ce4de506c1835129516a/lib/ruby-prof.rb#L36
def ruby_prof_mode
  case mode
  when "wall", "wall_time"
    ::RubyProf::WALL_TIME
  when "allocations"
    ::RubyProf::ALLOCATIONS
  when "memory"
    ::RubyProf::MEMORY
  when "process", "process_time"
    ::RubyProf::PROCESS_TIME
  else
    ::RubyProf::WALL_TIME
  end
end

def skip_boot?

def skip_boot?
  skip_boot == true
end

def test_prof_exclusions_enabled?

def test_prof_exclusions_enabled?
  @test_prof_exclusions_enabled == true
end