29

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?

Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
Kevin Pang
  • 41,172
  • 38
  • 121
  • 173
  • Kevin, FYI I re-wrote your question a bit and added a bounty – Sam Saffron Sep 09 '11 at 00:12
  • @SamSaffron today I've asked the same question (almost), I think it could be merged with this one. http://stackoverflow.com/questions/7352635/is-there-any-debug-toolbar-for-rails-3-x – Fabio Sep 09 '11 at 00:37

4 Answers4

20

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

See:

Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
11

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

Doug
  • 3,119
  • 3
  • 27
  • 30
4

There's NewRelic's "Developer Mode".

https://support.newrelic.com/help/kb/ruby/developer-mode

It's not a 1:1 but it does log actions, queries and even show you the source that executed queries.

They also have the source available at: https://github.com/newrelic/rpm

Chad Moran
  • 12,834
  • 2
  • 50
  • 72
  • I guess, but the issue is that it is not something you would run in prd, and you get no "chicklet", really hoping this gets ported, I feel blind when using my rails projects without it. – Sam Saffron Sep 09 '11 at 00:36
  • There were a few back in Rails 2 days, don't think they've been maintained though. – Chad Moran Sep 09 '11 at 00:41
  • Maybe you could mention names of those? – Smar Sep 10 '11 at 08:37
2

Rackbug is a Rack application, adds a diagnostics toolbar to Rack apps, it looks similar with MiniProfiler.

enter image description here

Take a look at features list:

  • Password-based security
  • IP-based security
  • Rack::Bug instrumentation/reporting is broken up into panels.
    • Panels in default configuration:
      • Rails Info
      • Timer
      • Request Variables
      • SQL
      • Active Record
      • Cache
      • Templates
      • Log
      • Memory
    • Other bundled panels:
      • Redis
      • Sphinx
    • The API for adding your own panels is simple and powerful

It can work on every environment you specified with restriction by IP address

Anatoly
  • 15,298
  • 5
  • 53
  • 77
  • you mentioned "the UI is not as rich - POST and AJAX support is not there". It's true, I have never ever see debug tools with modern UI and Ajax queries – Anatoly Sep 14 '11 at 02:07