lib/tunemygc/spies.rb in tunemygc-1.0.46 vs lib/tunemygc/spies.rb in tunemygc-1.0.47
- old
+ new
@@ -13,18 +13,22 @@
spy :ActiveJob, 'active_job'
spy :Manual, 'manual'
spy :Rspec, 'rspec'
spy :QueJob, 'que_job'
- def self.id
- @spies.key(current)
+ def self.ids
+ current.map do |spy|
+ @spies.key(spy)
+ end.join(',')
end
def self.current
if ENV['RUBY_GC_SPY']
- @spies[ENV['RUBY_GC_SPY']] || raise(NotImplementedError, "TuneMyGC spy #{ENV['RUBY_GC_SPY']} not supported. Valid spies are #{@spies.keys}")
+ ENV['RUBY_GC_SPY'].split(",").map do |spy|
+ @spies[spy] || raise(NotImplementedError, "TuneMyGC spy #{spy} not supported. Valid spies are #{@spies.keys}")
+ end
else
- TuneMyGc.rails? ? 'ActionController' : 'Manual'
+ [(TuneMyGc.rails? ? 'ActionController' : 'Manual')]
end
end
end
end