I'm a big fan of the MiniProfiler created by Jarrod Dixon and the Stack Overflow team for ASP.NET. Is there a port of it for Rails applications?
Since the core of the profiler is in JavaScript, JQuery.tmpl and Less it seems that porting the back-end to Rails would be fairly straight forward, the front-end is already done.
The front end architecture allows for POST and AJAX request profiling by attaching profiling ids to every request in a custom header (X-MiniProfiler-Ids
).
There is a similar port for Python and GAE.
Even though Rack Bug is fairly interesting, the UI is not as rich - POST and AJAX support is not there, there is no API for profiling blocks and use in production is not recommended.
Similarly, NewRelic in dev mode is not supported in production and does not have the famous MiniProfiler "chicklet" rendered on each page.
Is there a port of MiniProfiler in Rails?
Mini Profiler started as a tool for . NET applications, but it was ported to Ruby a few years ago as the Rack Mini Profiler. It uses Rails Rack middleware to intercept web requests and profile them. It's available as a gem; so to install it, add it to your Gemfile.
You can also use Alt + p to toggle on Windows/Linux and Option + p on MacOS.
Funny that you ask that, turns out we have been busy porting it to Ruby.
See:
"It displays footnotes in your application for easy debugging, such as sessions, request parameters, cookies, filter chain, routes, queries, etc.
Even more, it contains links to open files directly in your editor including your backtrace lines."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With