The specs for my rails project have been really slow lately. I did a git bisect to see if I could determine what has been slowing it and I found that certain commits that were previously running just fine are now just as slow as the current HEAD.
我的rails项目的规格最近一直很慢。我做了一个git bisect,看看我是否可以确定什么一直在减慢它,我发现以前运行得很好的某些提交现在和当前的HEAD一样慢。
This leads me to believe that my problem is being caused by a gem updating or something else that's not under my source control. The problem still occurs on other dev machines so I don't think it's my personal environment either.
这让我相信我的问题是由宝石更新或其他不受我的源代码控制引起的。问题仍然发生在其他开发机器上,所以我认为这也不是我的个人环境。
What's the best way to track down my slowest tests and then figure out what's slowing them down so much?
什么是追踪我最慢的测试然后弄清楚它们减速的最佳方法是什么?
1 个解决方案
#1
24
This flag will tell you which tests are the bottlenecks:
此标志将告诉您哪些测试是瓶颈:
$ rspec --profile
#1
24
This flag will tell you which tests are the bottlenecks:
此标志将告诉您哪些测试是瓶颈:
$ rspec --profile