Class: RSpec::Core::Profiler Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rspec-core/lib/rspec/core/profiler.rb |
Constant Summary
Class Method Summary
- .new ⇒ Profiler constructor Internal use only
Instance Attribute Summary
- #example_groups readonly Internal use only
Instance Method Summary
- #example_group_finished(notification) Internal use only
- #example_group_started(notification) Internal use only
- #example_started(notification) Internal use only
Instance Attribute Details
#example_groups (readonly)
[ GitHub ]# File 'rspec-core/lib/rspec/core/profiler.rb', line 11
attr_reader :example_groups
Instance Method Details
#example_group_finished(notification)
[ GitHub ]# File 'rspec-core/lib/rspec/core/profiler.rb', line 20
def example_group_finished(notification) return unless notification.group.top_level? group = @example_groups[notification.group] return unless group.key?(:start) group[:total_time] = Time.now - group[:start] end
#example_group_started(notification)
[ GitHub ]# File 'rspec-core/lib/rspec/core/profiler.rb', line 13
def example_group_started(notification) return unless notification.group.top_level? @example_groups[notification.group][:start] = Time.now @example_groups[notification.group][:description] = notification.group.top_level_description end
#example_started(notification)
[ GitHub ]# File 'rspec-core/lib/rspec/core/profiler.rb', line 28
def example_started(notification) group = notification.example.example_group.parent_groups.last @example_groups[group][:count] += 1 end