class RSpec::Core::Profiler

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/rspec/core/profiler.rbs

class RSpec::Core::Profiler
  def example_group_finished: (RSpec::Core::Notifications::GroupNotification notification) -> nil
end

@private

def example_group_finished(notification)

Experimental RBS support (using type sampling data from the type_fusion project).

def example_group_finished: (RSpec::Core::Notifications::GroupNotification notification) -> nil

This signature was generated using 1 sample from 1 application.

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

def example_group_started(notification)

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

def example_started(notification)

def example_started(notification)
  group = notification.example.example_group.parent_groups.last
  @example_groups[group][:count] += 1
end

def initialize

def initialize
  @example_groups = Hash.new { |h, k| h[k] = { :count => 0 } }
end