Created
December 8, 2015 14:51
-
-
Save skatkov/21bccf34339ab389fba9 to your computer and use it in GitHub Desktop.
profiling rspec's with stackproof
This file contains hidden or 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
| # 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