2

ベンチマークとパフォーマンス テストを実行しようとしていますが、メトリックが表示されません...

ルビー -v:

ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

rvm リスト:

=> 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.
4

1 に答える 1

3

確かに、パッチを適用した gc が必要です。ただし、このパッチはすべての ruby​​ で利用できるわけではありません。ruby 1.9.2 の場合、パッチ 290 を使用する必要があります。したがって、以下は問題なく動作するはずです。

rvm install 1.9.2-p290 --patch gcdata
于 2012-11-02T16:12:33.433 に答える