Sha256: f6db06f5e040e431b67ea35d916a21196961c70e5d3f11f90d00bf2d1ce48610
Contents?: true
Size: 319 Bytes
Versions: 18
Compression:
Stored size: 319 Bytes
Contents
# frozen_string_literal: true # @param [ String ] file The file path def redirect_output_to_file(file) $stdout.reopen(file, 'w') $stdout.sync = true 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
18 entries across 18 versions & 1 rubygems