To see what a single command does to CPU, memory and disk, I used to start it in one terminal and look at top in another. pidstat from the sysstat tools can start the command itself, report on it every second and stop when it ends.
Put -e last, followed by the program and its arguments. An interval is required:
pidstat -u -r -d 1 -e tar czf /tmp/test.tar.gz ~/Documents
The flags choose what to report. The man page says that with no flags only CPU activity is shown. -u is CPU, -r is memory (page faults and memory use), and -d is I/O: kB_rd/s and kB_wr/s are the kibibytes read from and written to disk per second, and iodelay is the block I/O delay of the task in clock ticks. The 1 is the interval in seconds.
You can also watch something that already runs, with -p and a PID, or the name of a command with -C. A count after the interval limits the number of reports, for example pidstat -d 1 5 prints five.
The caveat: -e needs a non-zero interval, and pidstat stops when the program terminates, so you only get what happened during that run. Short commands finish before you see more than a line or two. Also, pidstat is part of the sysstat project, so it may need installing first. For a ranking of which program wrote the most, iotop is the better fit.
Further reading: pidstat(1) manual page
Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid