{"id":2720,"date":"2018-02-05T21:06:22","date_gmt":"2018-02-06T03:06:22","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=2720"},"modified":"2018-02-05T21:06:22","modified_gmt":"2018-02-06T03:06:22","slug":"useful-rails-gem-rack-mini-profiler","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/2720","title":{"rendered":"Useful rails gem: rack mini profiler"},"content":{"rendered":"<p>Sometimes you need to do some profiling of your application to see where performance issues lie.  I haven&#8217;t done an extensive survey of the options, but a friend recommended <a href=\"https:\/\/github.com\/MiniProfiler\/rack-mini-profiler\">rack mini profiler<\/a>.  As the name suggests, this can be used with any rack based framework (so rails, hanami, etc).<\/p>\n<p>There are a number of reasons to use this profiler.  Learning to use a profiler, any profiler and how to performance tune is a key part of being a software developer, as opposed to programmer.<\/p>\n<p>It can run in production.  You can limit who can access the profiler, and it usually sits in the upper left hand corner with a &#8220;page load time&#8221;, but you can jump into more detail as needed.<\/p>\n<p>It runs all the time.  This lets you have an ambient view of the application (at least the parts that you are touching regularly).  <\/p>\n<p>When you are investigating a performance issue, you can easily dive into the views, controllers and SQL queries that your application is making.<\/p>\n<p>It is simple to install, just a simple gem in your Gemfile.<\/p>\n<p>Well worth getting to know, if you are supporting a rails application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you need to do some profiling of your application to see where performance issues lie. I haven&#8217;t done an extensive survey of the options, but a friend recommended rack [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"class_list":["post-2720","post","type-post","status-publish","format-standard","hentry","category-rails"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2720"}],"version-history":[{"count":2,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2720\/revisions"}],"predecessor-version":[{"id":2722,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2720\/revisions\/2722"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}