On Thu, May 31, 2007, Akihiro KAYAMA wrote:
>In article <[EMAIL PROTECTED]>,
>Chuck Swiger <[EMAIL PROTECTED]> writes:
>cswiger> Akihiro KAYAMA wrote:
>cswiger> > Hi all.
>cswiger> > What is the right way to measure wall-clock time in profiling on
>cswiger> The time shell builtin command or "/usr/bin/time -l _program_"?
>cswiger> The latter variant displays the rusage struct (ie, from "man
>Thanks for your response.
>Yes, we can know whether the program is I/O bound or CPU bound by
>time(1). But it is still unclear which part of the program is really
>waiting for I/O. So profiling is needed for tuning, although CPU time
>profiling gives me non-distinct result on I/O bound programs. It is
>reason why I want wall-clock time profiling.
Wall clock time doesn't generally tell you anything reliably
useful on a multi-tasking system as it's very dependent on other
system activity. I had many fights back in the mid '70s with
people in accounting who wanted to bill wall-clock time on
Burroughs main frames which generally had 20 programs in the mix
at any time (I guess they were accustomed to IBM 360s that
couldn't walk and chew gum at the same time :-).
If I had to measure wall-clock time for proceses, I would
probably write a simple wrapper script to execute the command
getting the system time before and after running the command I
wanted to time:
import os, time
tstart = time.time()
tend = time.time()
et = tstart - tend
INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
``Lord, the money we do spend on Government and it's not one bit better
than the government we got for one third the money twenty years ago.''
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"