Resource Monitor

Helping find the "Why" in "Why is Rails out of RAM?"

Resource Monitor is a simple Rails gem that can be used to extract resource utilization information before, during and after Rails actions. The following data is returned as part of the execution:

Our simple, low hassle installation process uses an ActionCable server and sets up a dashboard under /resources/.

Heroku, Flynn, Linux and Mac have full support under all environments. Windows users, good luck.

A sample app along with it's source and the gem's source are available.

Installation

Add the Gem to your Gemfile

Install the gem

Add the following to the top of your routes

Add the following at the top of your controller (or application.rb)

Optional: Use standard only: or except: options to limit the benchmarking to a specific action

Optional: Use any after_* callback (ActionController, ActiveRecord, and more coming) to get benchmark info

The following wizards were a great help when setting up a test app: /r/backwood_redneck, /r/inflx, greboide