Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a port mvc-mini-profiler for Rails?

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.

pic1

pic2

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?

like image 297
Kevin Pang Avatar asked Jul 25 '11 23:07

Kevin Pang


People also ask

What is rack mini profiler?

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.

How do I disable rack mini profiler?

You can also use Alt + p to toggle on Windows/Linux and Option + p on MacOS.


2 Answers

Funny that you ask that, turns out we have been busy porting it to Ruby.

See:

  • https://rubygems.org/gems/rack-mini-profiler
  • The website http://miniprofiler.com and
  • The github https://github.com/SamSaffron/MiniProfiler/tree/master/Ruby
like image 182
Sam Saffron Avatar answered Sep 22 '22 14:09

Sam Saffron


Have you looked at Rails-Footnotes?

"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."

like image 44
Doug Avatar answered Sep 23 '22 14:09

Doug