Created
September 20, 2014 16:30
-
-
Save SpringMT/04fef8fc9d7bdec77894 to your computer and use it in GitHub Desktop.
sample stackprof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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