ruby - profiler - ruby-prof. https://ruby-prof.github.io

访问量: 104

ruby-prof

Gemfile:

gem 'ruby-prof'

然后在application.rb 中增加中间件

config.middleware.use Rack::RubyProf, :path => './tmp/profile'

就会生成好多文件,放到 ./tmp/profile文件夹下

/your_app/current/tmp/profile$ ls
-call_stack.html                                       members-20210-update_is_able_to_login-flat.txt           members-42014-update_is_able_to_login-graph.html                members-43604-edit_inviter_code-graph.txt
-flat.txt                                              members-20210-update_is_able_to_login-graph.html         members-42014-update_is_able_to_login-graph.txt                 members-43611-edit-call_stack.html
-graph.html                                            members-20210-update_is_able_to_login-graph.txt          members-42237-member_account_statistics-call_stack.html         members-43611-edit-flat.txt
-graph.txt                                             members-28412-call_stack.html                            members-42237-member_account_statistics-flat.txt                members-43611-edit-graph.html
account_verifications-call_stack.html                  members-28412-edit-call_stack.html                       members-42237-member_account_statistics-graph.html              members-43611-edit-graph.txt
account_verifications-flat.txt                         members-28412-edit-flat.txt                              members-42237-member_account_statistics-graph.txt               members-43611-edit_inviter_code-call_stack.html
account_verifications-graph.html                       members-28412-edit-graph.html                            members-42319-edit-call_stack.html                              members-43611-edit_inviter_code-flat.txt
account_verifications-graph.txt                        members-28412-edit-graph.txt                             members-42319-edit-flat.txt                                     members-43611-edit_inviter_code-graph.html
charts-members_upload_idcard-call_stack.html           members-28412-flat.txt                                   members-42319-edit-graph.html                                   members-43611-edit_inviter_code-graph.txt
charts-members_upload_idcard-flat.txt                  members-28412-graph.html                                 members-42319-edit-graph.txt                                    members-43612-edit-call_stack.html

然后就可以查看里面各种进程的调用情况。

不过还没发现 跟内存相关的地方。

订阅/RSS Feed

Subscribe

分类/category