Sha256: 4e3f4c5bdeab32a1a7f596ade9deb65008da564e39e04087c3bc1e432f5c686f

Contents?: true

Size: 344 Bytes

Versions: 19

Compression:

Stored size: 344 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

19 entries across 19 versions & 1 rubygems

Version Path
cms_scanner-0.0.39.2 lib/cms_scanner/helper.rb
cms_scanner-0.0.39.1 lib/cms_scanner/helper.rb
cms_scanner-0.0.39.0 lib/cms_scanner/helper.rb
cms_scanner-0.0.38.4 lib/cms_scanner/helper.rb
cms_scanner-0.0.38.3 lib/cms_scanner/helper.rb
cms_scanner-0.0.38.2 lib/cms_scanner/helper.rb
cms_scanner-0.0.38.1 lib/cms_scanner/helper.rb
cms_scanner-0.0.38.0 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.12 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.11 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.10 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.9 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.8 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.7 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.6 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.5 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.4 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.3 lib/cms_scanner/helper.rb
cms_scanner-0.0.37.2 lib/cms_scanner/helper.rb