Skip to content

Instantly share code, notes, and snippets.

@SpringMT
Created September 20, 2014 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SpringMT/04fef8fc9d7bdec77894 to your computer and use it in GitHub Desktop.
Save SpringMT/04fef8fc9d7bdec77894 to your computer and use it in GitHub Desktop.
sample stackprof
StackProf.run(mode: :cpu, out: 'tmp/stackprof-cpu-sample.dump') do
1000.times do
Rails.configuration.database_configuration
ActiveRecord::Base.establish_connection(
username: 'root',
adapter: 'mysql2',
socket: '/tmp/mysql.sock'
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment