2012-05-03 2 views
2

내가 벤치 마크 및 성능 테스트를 실행하기 위해 노력하고있어 나는 표시하는 메트릭을받지 못했습니다 ...레일 3.0.12 성능 테스트는

루비 -v 발행 목록 :

=> ruby-1.9.2-p320-perf [ x86_64 ]

rake test:profile 실행의 결과 :

BrowsingTest#test_homepage (130 ms warmup) 
     process_time: 18446744073.71 sec 
       memory: unsupported 
      objects: unsupported 
BrowsingTest#test_intel_companies_newstats (34 ms warmup) 
     process_time: 26 ms 
       memory: unsupported 
      objects: unsupported 

실행 rake test:benchmark

BrowsingTest#test_homepage (103 ms warmup) 
      wall_time: 23 ms 
       memory: 0.00 KB 
      objects: 0 
      gc_runs: 0 
      gc_time: 0.00 ms 
BrowsingTest#test_intel_companies_newstats (31 ms warmup) 
      wall_time: 9 ms 
       memory: 0.00 KB 
      objects: 0 
      gc_runs: 0 
      gc_time: 0.00 ms 

내가 실행하려고하면

group :test do 
    gem 'capybara' 

    # for performance tests 
    gem 'ruby-prof', :git => 'git://github.com/wycats/ruby-prof.git' 
    gem 'test-unit' 
end 

내 보석 파일 :

rvm install 1.9.2 --patch gcdata --name perf

를 내가 가진 :

Installing Ruby from source to: /home/victor/.rvm/rubies/ruby-1.9.2-p320-perf, this may take a while depending on your cpu(s)... 

ruby-1.9.2-p320-perf - #fetching 
ruby-1.9.2-p320-perf - #extracting ruby-1.9.2-p320 to /home/victor/.rvm/src/ruby-1.9.2-p320-perf 
ruby-1.9.2-p320-perf - #extracted to /home/victor/.rvm/src/ruby-1.9.2-p320-perf 
Patch 'gcdata' not found. 

답변

3

실제로 패치 된 gc가 필요합니다. 그러나이 패치는 모든 루비에서 사용할 수있는 것은 아닙니다. 루비 1.9.2를 들어 당신은 (290) 그래서 다음과 같은 하나의 패치가 그들이 사용하는 루비의 버전을 사용할 수 있는지 여부를 확인하는 방법에 잘

rvm install 1.9.2-p290 --patch gcdata 
+0

어떤 생각을 작동해야 패치를 사용해야합니다? – DarinH

+0

레일 가이드를 사용했습니다. http://guides.rubyonrails.org/v3.2.13/performance_testing.html#installing-gc-patched-mri https://github.com/skaes/rvm-patchsets에서도 볼 수 있습니다. – Machine

관련 문제