class TestProf::RubyProf::Configuration
RubyProf
configuration
Constants
- LOGFILE_PREFIX
- PRINTERS
- PRINTER_EXTENSTION
Mapping from printer to report file extension NOTE: txt is not included and considered default
Attributes
custom_exclusions[RW]
exclude_common_methods[RW]
include_threads[RW]
min_percent[RW]
mode[RW]
printer[RW]
test_prof_exclusions_enabled[RW]
Public Class Methods
new()
click to toggle source
# File lib/test_prof/ruby_prof.rb, line 53 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_sym @min_percent = 1 @include_threads = false @exclude_common_methods = true @test_prof_exclusions_enabled = true @custom_exclusions = {} end
Public Instance Methods
exclude_common_methods?()
click to toggle source
# File lib/test_prof/ruby_prof.rb, line 68 def exclude_common_methods? exclude_common_methods == true end
include_threads?()
click to toggle source
# File lib/test_prof/ruby_prof.rb, line 64 def include_threads? include_threads == true end
resolve_printer()
click to toggle source
Returns an array of printer type (ID) and class.
# File lib/test_prof/ruby_prof.rb, line 77 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
test_prof_exclusions_enabled?()
click to toggle source
# File lib/test_prof/ruby_prof.rb, line 72 def test_prof_exclusions_enabled? @test_prof_exclusions_enabled == true end