Ruby on rails 我的性能测试没有预期的输出
我想对我的rails 3应用程序进行性能测试,并根据rails在线指南进行了尝试Ruby on rails 我的性能测试没有预期的输出,ruby-on-rails,ruby-on-rails-3,performance-testing,Ruby On Rails,Ruby On Rails 3,Performance Testing,我想对我的rails 3应用程序进行性能测试,并根据rails在线指南进行了尝试 rake test:profile 它给出了一些输出,如: Specify ruby-prof as application's 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 . Finish
rake test:profile
它给出了一些输出,如:
Specify ruby-prof as application's 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
但根据指南,应该有如下内容:
BrowsingTest#test_homepage (31 ms warmup)
wall_time: 6 ms
memory: 437.27 KB
objects: 5,514
gc_runs: 0
gc_time: 19 ms
还有一些在应用程序的tmp/performance dir中生成的日志文件,在我的例子中不存在
性能测试是在我的应用程序的test\performance目录中浏览_test.rb生成的示例测试:
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
需要“测试助手”
需要“rails/performance\u test\u help”
#每个测试方法的分析结果都会写入tmp/performance。
类浏览测试
我的rails版本是3.0.10。有人能给我一些提示吗?有完全相同的问题,通过运行解决了它
rvm install 1.9.2-p290 --patch gcdata # Make sure you have the same patch version
(注意:我不知道这一步有多大帮助,因为我有一个错误,但因为这是我所做的一部分…)
添加到我的文件
gem 'ruby-prof', :git => 'git://github.com/wycats/ruby-prof.git'
gem 'test-unit'
当然还有跑步
bundle install
一些对我有帮助的阅读