Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I configure what kind of statistics to measure? #17

Closed
stereobooster opened this issue Oct 20, 2017 · 1 comment
Closed

Can I configure what kind of statistics to measure? #17

stereobooster opened this issue Oct 20, 2017 · 1 comment

Comments

@stereobooster
Copy link

From what I see measuring all this statistics is pretty expensive. Can I specify what I want to measure to minify overhead, like only GC.count.

@jeremy
Copy link
Member

jeremy commented Oct 20, 2017

Yep:

gc_stat_meter = Trashed::Meter.new.tap do |meter|
  meter.instrument Trashed::Instruments::RubyGC.new
end

use Trashed::Rack, Trashed::RackReporter.new, meters: [ gc_stat_meter ]

@jeremy jeremy closed this as completed Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants