public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: piotr.krzysztof.gawel <piotr.krzysztof.gawel@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tst_timer: fix verification of execution time
Date: Thu, 25 Jul 2019 20:04:24 +0200	[thread overview]
Message-ID: <5d39ef2b.1c69fb81.d3010.b8ef@mx.google.com> (raw)
In-Reply-To: <20190725144450.GB24513@rei.lan>

Hi,Oops. I missed that. Please reject this patch.BR, PiotrWys?ano z mojego smartfona Samsung Galaxy.
-------- Oryginalna wiadomo?? --------Od: Cyril Hrubis <chrubis@suse.cz> Data: 25.07.2019  16:45  (GMT+01:00) Do: Piotr Gawel <piotr.krzysztof.gawel@gmail.com> DW: ltp@lists.linux.it Temat: Re: [LTP] [PATCH] tst_timer: fix verification of execution time Hi!> Each sample needs to be in range:>???? t < s[i] < t + threshold> Thus for i from the interval [d...n]:>???? (n-d)*t < sum(s[d...n]) < (n-d)*(t + threshold)> This patch fixes that check.As far as I can tell the function compute_treshold() multiplies thethreshold per call by keep_samples already, so it's a threashold per runnot a treshold per call, or do I miss something?> Signed-off-by: Piotr Gawel <piotr.krzysztof.gawel@gmail.com>> --->? lib/tst_timer_test.c | 2 +->? 1 file changed, 1 insertion(+), 1 deletion(-)> > diff --git a/lib/tst_timer_test.c b/lib/tst_timer_test.c> index f6459e5..4508e29 100644> --- a/lib/tst_timer_test.c> +++ b/lib/tst_timer_test.c> @@ -306,7 +306,7 @@ void do_timer_test(long long usec, unsigned int nsamples)>? 		samples[nsamples-1], samples[0], median,>? 		1.00 * trunc_mean / keep_samples, discard);>? > -	if (trunc_mean > (nsamples - discard) * usec + threshold) {> +	if (trunc_mean > keep_samples * (usec + threshold)) {>? 		tst_res(TFAIL, "%s slept for too long", scall);>? 		if (!print_frequency_plot)> -- > 2.7.4> > > -- > Mailing list info: https://lists.linux.it/listinfo/ltp-- Cyril Hrubischrubis@suse.cz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190725/2c4d35e6/attachment.htm>

      reply	other threads:[~2019-07-25 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 18:23 [LTP] [PATCH] tst_timer fixes Piotr Gawel
2019-07-24 18:23 ` [LTP] [PATCH] tst_timer: fix qsort comparison function Piotr Gawel
2019-07-25 14:39   ` Cyril Hrubis
2019-07-24 18:23 ` [LTP] [PATCH] tst_timer: fix verification of execution time Piotr Gawel
2019-07-25 14:45   ` Cyril Hrubis
2019-07-25 18:04     ` piotr.krzysztof.gawel [this message]

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=5d39ef2b.1c69fb81.d3010.b8ef@mx.google.com \
    --to=piotr.krzysztof.gawel@gmail.com \
    --cc=ltp@lists.linux.it \
    /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