class TestProf::StackProf::Listener
:nodoc:
Reporter for RSpec to profile specific examples with StackProf
def example_finished(notification)
def example_finished(notification) return unless profile?(notification.example) return if notification.example.metadata[:sprof_report] == false TestProf::StackProf.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[:sprof_report] = TestProf::StackProf.profile end
def profile?(example)
def profile?(example) example.metadata.key?(:sprof) end