ruby-on-rails - 如何在 Ruby on Rails 中分析请求?

标签 ruby-on-rails profiling

如何分析 Controller 操作?

我的一个观点需要相当长的时间来渲染,我想把它分解一下。我看到script/performance/profiler ,但这似乎只能访问全局范围。

最佳答案

ruby-prof是要走的路。这是一个方法,How to profile your Rails and Ruby applications with ruby-prof .

如果与kcachegrind等可视化工具结合使用,您可以轻松地将应用程序代码与框架代码分开。

不久前,我在本地的 Ruby 用户组就这些工具进行了演讲:Making your rails app kick ass with ruby-prof and kcachegrind .

关于ruby-on-rails - 如何在 Ruby on Rails 中分析请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2716418/

相关文章:

ruby-on-rails - "Cannot redirect to nil!"

python - 减少 for 循环和列表的内存占用

clojure - Clojure 的分析工具?

performance - 向量化三个 for 循环

ruby-on-rails - 我如何找出在我的 Rails 应用程序中生成所有这些额外的 sqlite3 选择的位置?

c# - 检测附加分析器

ruby-on-rails - 在ror中搜索数据库

ruby-on-rails - Rails 5.2 rspec - 如何测试模型是否确实使用自定义验证器?

ruby-on-rails - 具有恢复功能的文件上传(最好在 Ruby on Rails 中)

ruby-on-rails - 使用#update_all 更新时间戳