Sha256: 8c4ed2507ff7d15a756956a206eaec047be50e4a43d15e6662ec825212f0eefa
Contents?: true
Size: 343 Bytes
Versions: 6
Compression:
Stored size: 343 Bytes
Contents
# @param [ String ] file The file path def redirect_output_to_file(file) $stdout.reopen(file, 'w') $stdout.sync = true $stderr.reopen($stdout) # Not sure if this is needed end # @return [ Integer ] The memory of the current process in Bytes def memory_usage `ps -o rss= -p #{Process.pid}`.to_i * 1024 # ps returns the value in KB end
Version data entries
6 entries across 6 versions & 1 rubygems