3 ms·
Run the code snippet below to prove to yourself that a Ruby process can get its memory usage. print File.readlines('/proc/self/status').select {|line| line
by sciurus 9y ago
Run the code snippet below to prove to yourself that a Ruby process can get its memory usage.
print File.readlines('/proc/self/status').select {|line| line =~ /VmRSS/}[0]
This is not what people mean when they talk about memory profiling, but it looked like what you were talking about, so I thought I'd share it.