summaryrefslogtreecommitdiff
path: root/tool/lrama/lib/lrama/report/profile.rb
blob: 36156800a4ec8c44afc7ebfbe0739cfef20c2f57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Lrama
  class Report
    module Profile
      # See "Profiling Lrama" in README.md for how to use.
      def self.report_profile
        require "stackprof"

        StackProf.run(mode: :cpu, raw: true, out: 'tmp/stackprof-cpu-myapp.dump') do
          yield
        end
      end
    end
  end
end