Re: using the correct tool to time my parallel program

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

 



You can use the return value from times(), which returns the number of
clock ticks since system boot

Ingvald

Mark Farnell wrote:
I have a parallel program, which calls some message passing functions
which block.  Then I attempted to use times() (with struct tms) to
time the program.

the struct tms gives me the "program time" and the "system time" as
well as the child process time (if any).  However does it also include
the time spent when my program is blocked (i.e. network time).

This is important because although I use gprof to separate the CPU
time spent by my program vs libraries, when I calculate the total time
spent, I really need to include the time spent waiting for message
from network (network time).

Therefore is times() really appropriate for my purpose?  If not, what
other functions can I use instead? (such as gettimeofday?)

Thanks!

Mark
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
Ingvald Gjesdal
5955 Lindås

ingvald.gjesdal@xxxxxxxx
Tlf. 56 36 96 03
Mob. 408 00 084
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux