All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Intel graphics driver community testing & development
	<intel-gfx@lists.freedesktop.org>,
	Thomas Wood <thomas.wood@intel.com>
Subject: Re: [PATCH i-g-t v3] lib/igt_core: Prefer CLOCK_MONOTONIC_RAW
Date: Wed, 18 Nov 2015 14:54:20 +0200	[thread overview]
Message-ID: <1447851260.30841.1.camel@linux.intel.com> (raw)
In-Reply-To: <20151118122858.GC25108@nuc-i3427.alporthouse.com>

On ke, 2015-11-18 at 12:28 +0000, Chris Wilson wrote:
> On Wed, Nov 18, 2015 at 02:18:52PM +0200, Joonas Lahtinen wrote:
> > CLOCK_MONOTONIC_RAW is not affected by NTP, so it should be THE
> > clock
> > used for timing execution of tests.
> > 
> > When fetching either the starting or ending time of a test, show
> > the
> > time as -1.000s.
> > 
> > v3:
> > - Do not exit directly from handler (Chris)
> > - Show elapsed time as -1 if it is not calculable
> 
> Aye, that's better for the subtest handling.
> 
> > @@ -832,10 +851,16 @@ static void exit_subtest(const char *result)
> >  {
> >  	struct timespec now;
> >  	double elapsed;
> > +	int err;
> >  
> > -	gettime(&now);
> > -	elapsed = now.tv_sec - subtest_time.tv_sec;
> > -	elapsed += (now.tv_nsec - subtest_time.tv_nsec) * 1e-9;
> > +	err = gettime(&now);
> > +	if (!err && subtest_time.tv_sec != 0 &&
> > +	    subtest_time.tv_nsec != 0) {
> 
> A little paranoid? If we want the paranoia perhaps move it to gettime
> and return an error?
> 

I'm just checking that the starting time which is in the subtest_time
did not fail (which leads to both being zero). I'm not looking at the
now values :)

Regards, Joonas

> -Chris
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-11-18 12:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 10:24 [PATCH i-g-t] lib/igt_core: Prefer CLOCK_MONOTONIC_RAW Joonas Lahtinen
2015-11-17 10:40 ` Chris Wilson
2015-11-17 12:18   ` [PATCH i-g-t v2] " Joonas Lahtinen
2015-11-17 14:02     ` Chris Wilson
2015-11-18 12:18       ` [PATCH i-g-t v3] " Joonas Lahtinen
2015-11-18 12:28         ` Chris Wilson
2015-11-18 12:54           ` Joonas Lahtinen [this message]
2015-11-18 13:07             ` Chris Wilson
2015-11-19 11:00               ` [PATCH i-g-t v4] " Joonas Lahtinen
2015-11-19 11:43                 ` Chris Wilson
2015-11-20 11:26                   ` [PATCH i-g-t v5] " Joonas Lahtinen
2015-11-20 11:38                     ` Chris Wilson
2015-11-20 11:57                       ` [PATCH i-g-t v6] " Joonas Lahtinen
2015-11-23 12:52                         ` Joonas Lahtinen

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=1447851260.30841.1.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.