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)


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

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

Instance Method Details

#memoryObject



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

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