Skip to content

Instantly share code, notes, and snippets.

@skatkov
Created December 8, 2015 14:51
Show Gist options
  • Select an option

  • Save skatkov/21bccf34339ab389fba9 to your computer and use it in GitHub Desktop.

Select an option

Save skatkov/21bccf34339ab389fba9 to your computer and use it in GitHub Desktop.
profiling rspec's with stackproof
# read here: http://blog.iempire.ru/2015/10/13/profiling-specs/
RSpec.configure do |config|
config.around(:each) do |example|
path = Rails.root.join("tmp/stackprof-cpu-test-#{example.full_description.parameterize}.dump")
StackProf.run(mode: :cpu, out: path.to_s) do
example.run
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment