Expected Result for Performance Testing

I want to run a performance test for my rails 3 application, and I tried according to the rails online rail

rake test:profile 

and he gave some result like:

 Specify ruby-prof as application dependency in Gemfile to run benchmarks. Loaded suite /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_test_loader Started . Finished in 0.326233 seconds. 1 tests, 0 assertions, 0 failures, 0 errors, 0 skips 

But according to the manual, there should be something like:

 BrowsingTest#test_homepage (31 ms warmup) wall_time: 6 ms memory: 437.27 KB objects: 5,514 gc_runs: 0 gc_time: 19 ms 

as well as some log files created in the tmp / performance dir application that do not exist in my case.

A performance test is a generated test test, browsing_test.rb, in my application test \ performance dir:

 require 'test_helper' require 'rails/performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionDispatch::PerformanceTest def test_homepage get '/' end end 

And my rails version is 3.0.10. Can someone give me some tips or hints?

+4
source share
1 answer

Had the same problem and solved it by running

 rvm install 1.9.2-p290 --patch gcdata # Make sure you have the same patch version 

(note: not sure how much this step helped, as I had a mistake, but since this is part of what I did ...)

Adding to my gemfile

 gem 'ruby-prof', :git => 'git://github.com/wycats/ruby-prof.git' gem 'test-unit' 

And of course it works

 bundle install 

Some readings that helped me

+10
source

All Articles