Quotidien Shaarli
February 23, 2023

A gem that helps to detect potential memory bloats.
When your controller loads a lot of data to the memory but returns a small response to the client it might mean that you're using the IO in the non–optimal way. In this case, you'll see the following message in your logs:
Completed 200 OK in 349ms (Views: 2.1ms | ActiveRecord: 38.7ms | ActiveRecord Payload: 866.00 B | Response Payload: 25.00 B | Allocations: 72304)
Usage
Add this line to your application's Gemfile:
gem 'io_monitor'
Currently gem can collect the data from ActiveRecord
, Net::HTTP
and Redis
.