Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要分析我通常运行的测试套件bundle exec rspec spec/并生成 GIF 图像。
bundle exec rspec spec/
运行perftools.rb以使其与捆绑程序正常工作的命令是什么?
我也不得不四处挖掘才能得到这个。这是我所做的
把它放在 spec_helper.rb 中:
config.before :suite do PerfTools::CpuProfiler.start("/tmp/rspec_profile") end config.after :suite do PerfTools::CpuProfiler.stop end
运行你的 rspec
运行 pprof 以获取您的号码
pprof.rb --text /tmp/rspec_profile