time a command

How long a command takes, and how much memory and processor it used.

developmentprocesses

steps
  1. time command

    real is the clock time; user and sys, the processor's

  2. /usr/bin/time -v command

    also its peak memory (GNU time)

  3. hyperfine 'command'

    run it many times for a fair figure (hyperfine)

notes
  • real much bigger than user + sys means it was waiting: the disk, the network or you.
commands used

timehyperfine

Each has a page in lore: lore time opens it.