class PerfLab::Profiler

Constants

DIRECTORY
FILENAME

Public Class Methods

profile(lambda) click to toggle source
# File lib/perflab/profiler.rb, line 7
def profile(lambda)
  FileUtils.mkdir_p(DIRECTORY)
  path = "#{DIRECTORY}/#{FILENAME}"

  StackProf.run(mode: :wall, out: path, raw: true) { lambda.call }
end