Skip to content

Instantly share code, notes, and snippets.

@jhawthorn
Created February 12, 2015 19:25
Show Gist options
  • Save jhawthorn/215c8bd29de44f2a7be1 to your computer and use it in GitHub Desktop.
Save jhawthorn/215c8bd29de44f2a7be1 to your computer and use it in GitHub Desktop.
Throw this in spec/support and run specs as normal. Stackprof will output a profile to the tmp directory.
Capybara.app = Rack::Builder.new do
map "/" do
use StackProf::Middleware,
enabled: true,
mode: :wall,
interval: 100,
save_at_exit: true
run Rails.application
end
end.to_app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment