rack-mini-profiler is a profiling middleware for Ruby Rack applications that displays performance metrics directly in the browser during development and production.
The tool addresses the need to understand application performance bottlenecks by injecting a speed badge into every HTML page response. It captures detailed profiling data including database query timing, call-stack information via flame graphs, and per-request memory usage along with garbage collection statistics. The middleware integrates with Rails through ActiveSupport::Notifications rather than patching Rails methods directly, allowing it to gather timing information for template rendering, database queries, and other instrumented operations without invasive modifications to the framework.
Developers should adopt this tool if they need real-time visibility into request performance across development and production environments. It works well for Rails applications and other Rack-based frameworks where understanding query performance, gem overhead, and memory allocation patterns is important. The tool supports multiple databases including MySQL, PostgreSQL, and Oracle, as well as MongoDB through Mongoid. Teams running production applications benefit from the ability to profile live traffic without requiring separate profiling tools or log analysis.
The project is actively seeking community contributions to help with issue triage and repository restructuring efforts as part of a larger initiative to separate the central UI from language-specific implementations.