main
 1# frozen_string_literal: true
 2
 3require 'ruby-prof'
 4
 5module RubyProfiler
 6  def with_profiler
 7    result = RubyProf.profile do
 8      yield
 9    end
10    printer = RubyProf::CallTreePrinter.new(result)
11    printer.print(path: 'tmp/', profile: Time.now.utc.iso8601)
12  end
13end
14
15RSpec.configure do |config|
16  config.include RubyProfiler
17end