Class: Minitest::TestProf::TagProfReporter
- Inherits:
-
BaseReporter
- Object
- AbstractReporter
- BaseReporter
- Minitest::TestProf::TagProfReporter
- Defined in:
- lib/test_prof/tag_prof/minitest.rb
Overview
:nodoc:
Constant Summary
Constants included from TestProf::Logging
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Attributes inherited from BaseReporter
Instance Method Summary collapse
-
#initialize(io = $stdout, _options = {}) ⇒ TagProfReporter
constructor
A new instance of TagProfReporter.
- #prerecord(group, example) ⇒ Object
- #record(result) ⇒ Object
- #report ⇒ Object
Methods inherited from BaseReporter
#after_test, #before_test, #start
Methods included from TestProf::Logging
Constructor Details
#initialize(io = $stdout, _options = {}) ⇒ TagProfReporter
Returns a new instance of TagProfReporter.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/test_prof/tag_prof/minitest.rb', line 8 def initialize(io = $stdout, = {}) super @results = ::TestProf::TagProf::Result.new("type") if event_prof_activated? require "test_prof/event_prof" @current_group_id = nil @events_profiler = configure_profiler @results = ::TestProf::TagProf::Result.new("type", @events_profiler.events) end end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
6 7 8 |
# File 'lib/test_prof/tag_prof/minitest.rb', line 6 def results @results end |
Instance Method Details
#prerecord(group, example) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/test_prof/tag_prof/minitest.rb', line 20 def prerecord(group, example) return unless event_prof_activated? # enable event profiling @events_profiler.group_started(true) end |
#record(result) ⇒ Object
27 28 29 30 |
# File 'lib/test_prof/tag_prof/minitest.rb', line 27 def record(result) results.track(main_folder_path(result), time: result.time, events: fetch_events_data) @events_profiler.group_started(nil) if event_prof_activated? # reset and disable event profilers end |