add memorylogic

This commit is contained in:
albert
2013-02-17 17:50:00 -05:00
parent fdff706336
commit 48d4673935
4 changed files with 17 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
module Memorylogic
class << self
include ActionView::Helpers::NumberHelper
end
def self.memory_usage
number_to_human_size(`ps -o rss= -p #{Process.pid}`.to_i)
end
end