Class: Oink::Instrumentation::MemorySnapshot
- Inherits:
-
Object
- Object
- Oink::Instrumentation::MemorySnapshot
- Defined in:
- lib/oink/instrumentation/memory_snapshot.rb
Class Method Summary collapse
Class Method Details
.memory ⇒ Object
6 7 8 |
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 6 def self.memory memory_snapshot_class.new.memory end |
.memory_snapshot_class ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 10 def self.memory_snapshot_class @@memory_snapshot_class ||= begin [WindowsMemorySnapshot, StatmMemorySnapshot, SmapsMemorySnapshot, ProcessStatusMemorySnapshot].find { |snapshot_class| snapshot_class.available? } end raise MemoryDataUnavailableError if @@memory_snapshot_class.nil? @@memory_snapshot_class end |