class TestProf::EventProf::Configuration
EventProf
configuration
Constants
- INSTRUMENTERS
Map of supported instrumenters
Attributes
event[RW]
instrumenter[RW]
per_example[RW]
rank_by[RW]
top_count[RW]
Public Class Methods
new()
click to toggle source
# File lib/test_prof/event_prof.rb, line 39 def initialize @event = ENV["EVENT_PROF"] @instrumenter = :active_support @top_count = (ENV["EVENT_PROF_TOP"] || 5).to_i @per_example = ENV["EVENT_PROF_EXAMPLES"] == "1" @rank_by = (ENV["EVENT_PROF_RANK"] || :time).to_sym @stamp = ENV["EVENT_PROF_STAMP"] RSpecStamp.config.tags = @stamp if stamp? end
Public Instance Methods
per_example?()
click to toggle source
# File lib/test_prof/event_prof.rb, line 54 def per_example? per_example == true end
resolve_instrumenter()
click to toggle source
# File lib/test_prof/event_prof.rb, line 58 def resolve_instrumenter return instrumenter if instrumenter.is_a?(Module) raise ArgumentError, "Unknown instrumenter: #{instrumenter}" unless INSTRUMENTERS.key?(instrumenter) Instrumentations.const_get(INSTRUMENTERS[instrumenter]) end
stamp?()
click to toggle source
# File lib/test_prof/event_prof.rb, line 50 def stamp? !@stamp.nil? end