class TestProf::StackProf::Configuration
StackProf
configuration
Constants
- FORMATS
Attributes
format[RW]
interval[RW]
mode[RW]
raw[RW]
target[RW]
Public Class Methods
new()
click to toggle source
# File lib/test_prof/stack_prof.rb, line 29 def initialize @mode = ENV.fetch("TEST_STACK_PROF_MODE", :wall).to_sym @target = ENV["TEST_STACK_PROF"] == "boot" ? :boot : :suite @raw = ENV["TEST_STACK_PROF_RAW"] != "0" @format = if FORMATS.include?(ENV["TEST_STACK_PROF_FORMAT"]) ENV["TEST_STACK_PROF_FORMAT"] else "html" end sample_interval = ENV["TEST_STACK_PROF_INTERVAL"].to_i @interval = sample_interval > 0 ? sample_interval : nil end
Public Instance Methods
boot?()
click to toggle source
# File lib/test_prof/stack_prof.rb, line 48 def boot? target == :boot end
raw?()
click to toggle source
# File lib/test_prof/stack_prof.rb, line 44 def raw? @raw == true end
suite?()
click to toggle source
# File lib/test_prof/stack_prof.rb, line 52 def suite? target == :suite end