File: memory.rb

package info (click to toggle)
ruby-tty-command 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 452 kB
  • sloc: ruby: 1,990; makefile: 4; sh: 4
file content (11 lines) | stat: -rw-r--r-- 230 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# encoding: utf-8
#
require 'memory_profiler'
require 'tty-command'

report = MemoryProfiler.report do
  cmd = TTY::Command.new(color: false)
  cmd.run("echo 'hello world!'")
end

report.pretty_print(to_file: 'memory_report.txt')