Class: Minitest::TestProf::MemoryProfReporter
- Inherits:
-
BaseReporter
- Object
- AbstractReporter
- BaseReporter
- Minitest::TestProf::MemoryProfReporter
- Defined in:
- lib/test_prof/memory_prof/minitest.rb
Overview
:nodoc:
Constant Summary
Constants included from TestProf::Logging
Instance Attribute Summary collapse
-
#current_example ⇒ Object
readonly
Returns the value of attribute current_example.
-
#printer ⇒ Object
readonly
Returns the value of attribute printer.
-
#tracker ⇒ Object
readonly
Returns the value of attribute tracker.
Attributes inherited from BaseReporter
Instance Method Summary collapse
-
#initialize(io = $stdout, options = {}) ⇒ MemoryProfReporter
constructor
A new instance of MemoryProfReporter.
- #prerecord(group, example) ⇒ Object
- #record(example) ⇒ Object
- #report ⇒ Object
- #start ⇒ Object
Methods inherited from BaseReporter
Methods included from TestProf::Logging
Constructor Details
#initialize(io = $stdout, options = {}) ⇒ MemoryProfReporter
Returns a new instance of MemoryProfReporter.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 10 def initialize(io = $stdout, = {}) super configure_profiler() @tracker = ::TestProf::MemoryProf.tracker @printer = ::TestProf::MemoryProf.printer(tracker) @current_example = nil end |
Instance Attribute Details
#current_example ⇒ Object (readonly)
Returns the value of attribute current_example.
8 9 10 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 8 def current_example @current_example end |
#printer ⇒ Object (readonly)
Returns the value of attribute printer.
8 9 10 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 8 def printer @printer end |
#tracker ⇒ Object (readonly)
Returns the value of attribute tracker.
8 9 10 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 8 def tracker @tracker end |
Instance Method Details
#prerecord(group, example) ⇒ Object
21 22 23 24 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 21 def prerecord(group, example) set_current_example(group, example) tracker.example_started(current_example) end |
#record(example) ⇒ Object
26 27 28 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 26 def record(example) tracker.example_finished(current_example) end |
#report ⇒ Object
34 35 36 37 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 34 def report tracker.finish printer.print end |
#start ⇒ Object
30 31 32 |
# File 'lib/test_prof/memory_prof/minitest.rb', line 30 def start tracker.start end |