[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH][RFC] New 'true' program

From: Alfred M. Szmidt
Subject: Re: [PATCH][RFC] New 'true' program
Date: Tue, 23 Nov 2004 08:18:26 +0100

   More than just a few bytes:

   $ /usr/bin/time true
   0.01user 0.00system 0:00.02elapsed 41%CPU (0avgtext+0avgdata 0maxresident)k
   0inputs+0outputs (134major+35minor)pagefaults 0swaps

   I think that this is valid for the ``false'' program too:

   $ /usr/bin/time false
   Command exited with non-zero status 1
   0.00user 0.02system 0:00.02elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
   0inputs+0outputs (134major+35minor)pagefaults 0swaps

   It's not a matter of just a few bytes of disk space, but a somewhat
   considerable amount of system resources to ``do nothing,

Where is this "considerable amount"?

~ $ cat true.c
int main (void) { return 0; }
~ $ gcc true.c -o true-foo
~ $ /usr/bin/time ./true-foo
0.00user 0.00system 0:00.06elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (52major+28minor)pagefaults 0swaps
~ $ /usr/bin/time /bin/true
0.00user 0.00system 0:00.03elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (68major+28minor)pagefaults 0swaps

(and I really do not take time that seriously for "benchmarks" of this
kind, you would have to run it a couple of times and get the average)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]