gpt4 book ai didi

ruby-on-rails - Rails 4 内存分析

转载 作者:数据小太阳 更新时间:2023-10-29 08:47:51 25 4
gpt4 key购买 nike

我需要分析 Rails 4 应用程序的内存使用情况(使用 ruby​​ MRI)。一点谷歌搜索让我进入了http://guides.rubyonrails.org/v3.2.13/performance_testing.html

我有两个问题:

  • 是否兼容rails 4
  • 我正在使用 rspec。似乎我的 rake test 测试不可用(rails generator performance_test)。例如,当我键入 rake test:profile 时,我收到 Don't know how to build task 'test:profile'。有人知道如何解决这个问题吗?

预先感谢您的帮助。

最佳答案

Oink是我在 Rails 4 中使用的东西。

Oink adds memory and active record instantiation information to rails log during runtime and provides an executable to help digest the enhanced logs.

Given a minimum threshold and a metric (memory or active record instantiation), the oink executable reports:

The top ten single requests which exceeded the threshold for the metric, ordered by the request which exceeded the threshold the most

The number of times each action exceeded the threshold for the metric, ordered by the action which exceeded the threshold the most

(in verbose mode) The log lines produced by requests which exceeded the threshold

关于ruby-on-rails - Rails 4 内存分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22101737/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com