O Mac OS X não é fornecido com a pilha GNU. Você tem "Tempo BSD" time.c,v 1.9
. Você pode verificar isso digitando:
strings /usr/bin/time | grep c,v
O tempo de BSD não suporta --verbose
, mas suporta /usr/bin/time -lp
:
$ /usr/bin/time -lp echo hi
hi
real 0.02
user 0.00
sys 0.00
700416 maximum resident set size
0 average shared memory size
0 average unshared data size
0 average unshared stack size
174 page reclaims
6 page faults
0 swaps
7 block input operations
1 block output operations
0 messages sent
0 messages received
0 signals received
9 voluntary context switches
1 involuntary context switches
$
Que parece fornecer muito da saída que o GNU time
fornece com --verbose
:
ubuntu@sandbox:~$ /usr/bin/time --verbose echo hi
hi
Command being timed: "echo hi"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 66%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1804
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 78
Voluntary context switches: 1
Involuntary context switches: 3
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
ubuntu@sandbox:~$
Se você realmente quer o --verbose
, pode instalar o GNU time
com o Homebrew :
$ brew install gnu-time
==> Downloading https://homebrew.bintray.com/bottles/gnu-time-1.7.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring gnu-time-1.7.yosemite.bottle.1.tar.gz