运行单轨性能测试

Jim*_*ith 3 ruby-on-rails performance-testing

我试图在test/performance/目录中运行单个基准测试.有点像rake test:benchmark,但只有一次测试.

这样做的原因是因为整个性能套件需要相当长的时间才能运行,而我只对测试改变最初会影响的模型感兴趣.

我试过这个,但它没有设置基准测试环境:

ruby -Ilib:test test/performance/email_list_test.rb 
Run Code Online (Sandbox Code Playgroud)

也尝试过rails基准测试程序EmailList.all,但我相信必须从标准单元测试中拉出来.

小智 7

试试这个:

rake test:benchmark TEST=test/performance/email_list_test.rb 
Run Code Online (Sandbox Code Playgroud)