class TestProf::RubyProf::Listener
:nodoc:
Reporter for RSpec to profile specific examples with RubyProf
def example_finished(notification)
def example_finished(notification) return unless profile?(notification.example) notification.example.metadata[:rprof_report]&.dump( self.class.report_name_generator.call(notification.example) ) end
def example_started(notification)
def example_started(notification) return unless profile?(notification.example) notification.example.metadata[:rprof_report] = TestProf::RubyProf.profile end
def profile?(example)
def profile?(example) example.metadata.key?(:rprof) end