Class: Oink::Instrumentation::ProcessStatusMemorySnapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/oink/instrumentation/memory_snapshot.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 90

def self.available?
  SystemCall.execute("ps -o vsz= -p #{$$}").success?
end

Instance Method Details

#memoryObject



86
87
88
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 86

def memory
  SystemCall.execute("ps -o vsz= -p #{$$}").stdout.to_i
end