Skip to content

Instantly share code, notes, and snippets.

@fsaravia
Created August 9, 2014 13:36
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 fsaravia/7810c2aec67901d886e3 to your computer and use it in GitHub Desktop.
Save fsaravia/7810c2aec67901d886e3 to your computer and use it in GitHub Desktop.
ENV['CPUPROFILE_REALTIME'] = 1
require 'perftools'
require 'rspec'
dirs = []
dirs.concat Dir["./spec/models/*.rb"]
dirs.concat Dir["./spec/routes/*.rb"]
dirs.concat Dir["./spec/helpers/*.rb"]
dirs.concat Dir["./spec/script/*.rb"]
RSpec::Core::Runner.disable_autorun!
PerfTools::CpuProfiler.start("tmp/add_numbers_profile") do
RSpec::Core::Runner.run(dirs)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment