lib/tasks/benchmarks/json.rake
# the first two methods are roughly similar
the first two methods are roughly similar
the first two methods are roughly similar
def profile_with_get_process_mem
  before_bytes = GetProcessMem.new.bytes
  yield
  after_bytes = GetProcessMem.new.bytes
  puts "after: #{(after_bytes/1024/1024).to_i}MB"
  puts "delta: #{((after_bytes.to_i - before_bytes.to_i)/1024/1024).to_i}MB"
end
def profile_with_get_process_mem before_bytes = GetProcessMem . new . bytes yield after_bytes = GetProcessMem . new . bytes puts "after: #{(after_bytes/1024/1024).to_i}MB" puts "delta: #{((after_bytes.to_i - before_bytes.to_i)/1024/1024).to_i}MB" end
the first two methods are roughly similar
the first two methods are roughly similar