Add memory profiler gem for ruby 2.1

This commit is contained in:
Sam 2014-02-10 15:21:37 +11:00
parent a8faac5f0a
commit ca170e4636
3 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,7 @@ gem 'lru_redux'
gem 'flamegraph', require: false
gem 'rack-mini-profiler', require: false
gem 'memory_profiler', require: false, platform: :mri_21
# used for caching, optional
gem 'rack-cors', require: false

View File

@ -163,6 +163,7 @@ GEM
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memory_profiler (0.0.4)
message_bus (0.9.4)
eventmachine
rack (>= 1.1.3)
@ -425,6 +426,7 @@ DEPENDENCIES
librarian (>= 0.0.25)
listen (= 0.7.3)
lru_redux
memory_profiler
message_bus
minitest
mocha

View File

@ -2,6 +2,7 @@
if Rails.configuration.respond_to?(:enable_mini_profiler) && Rails.configuration.enable_mini_profiler
require 'rack-mini-profiler'
require 'flamegraph'
require 'memory_profiler' if RUBY_VERSION >= "2.1.0"
# initialization is skipped so trigger it
Rack::MiniProfilerRails.initialize!(Rails.application)
end