Skip to content

Instantly share code, notes, and snippets.

@tmm1
Created February 14, 2011 21:12
Show Gist options
  • Select an option

  • Save tmm1/826547 to your computer and use it in GitHub Desktop.

Select an option

Save tmm1/826547 to your computer and use it in GitHub Desktop.
diff --git a/Gemfile b/Gemfile
index 3e1c3e6..2a45190 100644
--- a/Gemfile
+++ b/Gemfile
@@ -20,6 +20,8 @@ gem "system_timer", "1.0"
gem "will_paginate", "3.0.pre2"
gem "xml-simple", "1.0.12"
+gem "memprof", "0.3.10.beta.1"
+
# These gems suck and do stupid things when in maintenance mode
group :development, :test, :staging, :production do
gem "delayed_job", "2.1.2"
diff --git a/Gemfile.lock b/Gemfile.lock
index 22dbbf1..7261ec5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -84,6 +84,7 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ memprof (0.3.10.beta.1)
mime-types (1.16)
net-ssh (2.0.24)
newrelic_rpm (2.13.0.beta6)
@@ -158,6 +159,7 @@ DEPENDENCIES
json (= 1.2.0)
launchy (= 0.3.7)
mail (= 2.2.15)
+ memprof (= 0.3.10.beta.1)
newrelic_rpm (= 2.13.0.beta6)
nokogiri (= 1.4.3.1)
paul_revere (= 0.1.5)
diff --git a/config/application.rb b/config/application.rb
index 10c25a2..2472770 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -20,6 +20,9 @@ module Gemcutter
config.time_zone = "UTC"
config.encoding = "utf-8"
+ require 'memprof/tracer'
+ config.middleware.insert 0, Memprof::Tracer
+
config.middleware.use "Hostess"
config.middleware.insert_after "Hostess", "Redirector" if $rubygems_config[:redirector]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment