public
Description: Keep tabs on expensive Ruby garbage collection. Support for NewRelic RPM and Rack.
Homepage:
Clone URL: git://github.com/37signals/trashed.git
commit  655eac5db862701fb12f1e3217802159697a607c
tree    b836fb3dad99269f8e60aba950d1237e37db14da
parent  56776e8457f025dfe32b355eb0d298c45a997898
name age message
file .gitignore Mon Aug 24 18:08:51 -0700 2009 Rewrite and add tests [jeremy]
file MIT-LICENSE Mon Aug 24 18:08:51 -0700 2009 Rewrite and add tests [jeremy]
file README Tue Aug 25 09:20:11 -0700 2009 Add a usage note [jeremy]
file Rakefile Mon Aug 24 18:08:51 -0700 2009 Rewrite and add tests [jeremy]
file init.rb Mon Aug 24 18:08:51 -0700 2009 Rewrite and add tests [jeremy]
directory lib/ Thu Aug 27 10:21:02 -0700 2009 Prefer NewRelic::Control.instance.log to NewRel... [jeremy]
directory test/ Tue Aug 25 13:40:40 -0700 2009 GC/Runs -> GC/Collections [jeremy]
file trashed.gemspec Mon Aug 24 18:08:51 -0700 2009 Rewrite and add tests [jeremy]
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