This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'term/ansicolor' | |
# yeilds a stacktrace for each SQL query | |
# put this file in config/initializers | |
class QueryTrace < ActiveSupport::LogSubscriber | |
include Term::ANSIColor | |
attr_accessor :trace_queries | |
def sql(event) #:nodoc: | |
return unless QueryTrace.enabled? && logger.debug? && Rails.env.development? |