linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mark Farnell" <mark.farnell@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: using the correct tool to time my parallel program
Date: Sat, 9 Jun 2007 17:08:17 +1200	[thread overview]
Message-ID: <aaf549e0706082208n4b5df24x544e0edcf43ef3dc@mail.gmail.com> (raw)

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

             reply	other threads:[~2007-06-09  5:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09  5:08 Mark Farnell [this message]
2007-06-09  8:02 ` using the correct tool to time my parallel program Ingvald Gjesdal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aaf549e0706082208n4b5df24x544e0edcf43ef3dc@mail.gmail.com \
    --to=mark.farnell@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).