Grape::Middleware::Lograge has a before hook that subscribes to ActiveSupport::Notifications.subscribe('sql.active_record') in which a new ActiveSupport::Notifications::Event object is created every time the event fires, presumably one for every database query, which runs up ruby's garbage collection and object allocations enormously. All the Event object does is calculate "1000.0 * (ending - start)", and doesn't seem necessary at all.