Skip to content

Commit

Permalink
Adding perftools.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed May 11, 2011
1 parent 3352793 commit 2dedd53
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gem "sass"
gem "compass"
gem "tzinfo"
gem "exceptional"
gem "rack-perftools_profiler", :require => 'rack/perftools_profiler'

group :development, :test do
gem "minitest", :platforms => :ruby_18
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ GEM
osub (0.0.4)
ostatus
ruby-hmac
perftools.rb (0.5.6)
plucky (0.3.7)
mongo (~> 1.1)
polyglot (0.3.1)
Expand All @@ -151,6 +152,10 @@ GEM
rack-openid (1.2.0)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-perftools_profiler (0.4.0)
open4 (~> 1.0)
perftools.rb (~> 0.5)
rack (~> 1.0)
rack-test (0.5.7)
rack (>= 1.0)
rack-timeout (0.0.1)
Expand Down Expand Up @@ -247,6 +252,7 @@ DEPENDENCIES
pony
pygmentize
rack-flash
rack-perftools_profiler
rack-test
rack-timeout
rdiscount
Expand Down
6 changes: 5 additions & 1 deletion config/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Rstatus
# We're using rack-timeout to ensure that our dynos don't get starved by renegade
# processes.
use Rack::Timeout
Rack::Timeout.timeout = 10
Rack::Timeout.timeout = 20

set :root, File.join(File.dirname(__FILE__), "..")
set :haml, :escape_html => true
Expand All @@ -61,6 +61,9 @@ class Rstatus
Compass.add_project_configuration(File.join(File.dirname(__FILE__), 'compass.config'))
MongoMapperExt.init

# We want to be able to profile things, so we're using the perftools middleware.
use ::Rack::PerftoolsProfiler, :default_printer => 'text', :mode => :methods

# now that we've connected to the db, let's load our models.
require_relative '../models/all'
end
Expand All @@ -80,4 +83,5 @@ class Rstatus
provider :twitter, ENV["CONSUMER_KEY"], ENV["CONSUMER_SECRET"]
provider :facebook, ENV["APP_ID"], ENV["APP_SECRET"], {:scope => 'publish_stream,offline_access,email'}
end

end

0 comments on commit 2dedd53

Please sign in to comment.