Skip to content

Instantly share code, notes, and snippets.

@chendo
Created April 18, 2012 05:59
Show Gist options
  • Save chendo/2411378 to your computer and use it in GitHub Desktop.
Save chendo/2411378 to your computer and use it in GitHub Desktop.
New Relic Custom View for super useful DB stats
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/find' title:'ActiveRecord Find Response time' value:average_response_time %}
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/create' title:'ActiveRecord Create Response time' value:average_response_time %}
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/save' title:'ActiveRecord Save Response time' value:average_response_time %}
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/destroy' title:'ActiveRecord Destroy Response time' value:average_response_time %}
{% line_chart value:call_count regexp:'Database/SQL/.*' title:'SQL Throughput' %}
{% line_chart value:average_response_time regexp:'Database/SQL/.*' title:'SQL Response Time' %}
{% line_chart regexp:'ActiveRecord/.*/find' title:'Total Time on Finds' value:total_value %}
{% line_chart regexp:'ActiveRecord/.*/create' title:'Total Time on Creates' value:total_value %}
{% line_chart regexp:'ActiveRecord/.*/save' title:'Total Time on Saves' value:total_value %}
{% line_chart regexp:'ActiveRecord/.*/destroy' title:'Total Time on Destroys' value:total_value %}
{% line_chart regexp:'ActiveRecord/.*/find' title:'Slowest Finds' value:average_response_time %}
{% line_chart regexp:'ActiveRecord/.*/create' title:'Slowest Creates' value:average_response_time %}
{% line_chart regexp:'ActiveRecord/.*/save' title:'Slowest Saves' value:average_response_time %}
{% line_chart regexp:'ActiveRecord/.*/destroy' title:'Slowest Destroys' value:average_response_time %}
{% line_chart regexp:'ActiveRecord/.*/find' title:'Highest Throughput Finds' value:call_count %}
{% line_chart regexp:'ActiveRecord/.*/create' title:'Highest Throughput Creates' value:call_count %}
{% line_chart regexp:'ActiveRecord/.*/save' title:'Highest Throughput Saves' value:call_count %}
{% line_chart regexp:'ActiveRecord/.*/destroy' title:'Highest Throughput Destroys' value:call_count %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment