Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Keep tabs on expensive Ruby garbage collection. Support for NewRelic RPM and Rack.
Branch: master
Pull request Compare This branch is 46 commits behind basecamp:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
MIT-LICENSE
README
Rakefile
init.rb
trashed.gemspec

README

Trashed keeps an eye on what you throw out for garbage collection.
Measure object allocations, heap growth, and garbage collection time.

Provides a Rack middleware to log per-request piggishness as well as
periodic samplers for NewRelic's Rails Performance Monitor.

You can also mix and match the Metrics to rig up your own resource
monitors or provide new Metrics to sample with NewRelic.

Trashed requires Ruby Enterprise Edition (REE) or a patched Ruby 1.8.
See http://github.com/skaes/railsbench for patches.


== Using the NewRelic samplers with Rails

In an initializer such as config/initializers/newrelic.rb:

  if GC.respond_to?(:enable_stats)
    GC.enable_stats
    require 'trashed/newrelic/enable'
  end


== Using the Rack logger with Rails

  config.middleware.use Trashed::Rack::RequestLogger, Rails.logger, Trashed::Metrics.available
Something went wrong with that request. Please try again.