运行单轨性能测试
我正在尝试在 test/performance/
目录中运行单个基准测试。有点像 rake test:benchmark 会做的,但仅限于单个测试。
这样做的原因是因为整个性能套件需要相当多的时间来运行,而我只对测试更改首先会影响的模型感兴趣。
我已经尝试过这个,但它没有设置基准测试环境:
ruby -Ilib:test test/performance/email_list_test.rb
还尝试了rails benchmarker EmailList.all
,但我相信这必须是从标准单元测试中提取的。
I am trying to run a single benchmark in the test/performance/
directory. kinda like rake test:benchmark
would do, but only with a single test.
The reason for this is because the whole performance suite takes a fair amount of time to run, and I am only interested in doing tests the model that the change will effect at first.
I have tried this, but it does not setup the benchmarking environment:
ruby -Ilib:test test/performance/email_list_test.rb
Also tried rails benchmarker EmailList.all
, but I believe that must be pulling from the standard unit tests.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: