linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rt-tests v2 4/4] signaltest: Only print from the first thread stats when quiet
@ 2020-09-03 17:33 Daniel Wagner
  2020-09-03 17:37 ` John Kacur
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Wagner @ 2020-09-03 17:33 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

When the quiet option is used don't print all threads stats. The first
thread will pause every 16 cycles for 10000us. This will show up in
the max values for all other threads when the final results are
printed:

 # signaltest -q  -D 2s
 T: 0 ( 4517) P: 0 C:   3121 Min:      5 Act:    8 Avg:    8 Max:      19
 T: 1 ( 4518) P: 0 C:   3121 Min:      5 Act:10065 Avg:  639 Max:   10073

We could also remove the sleep but then the system gets fully loaded
by the test. Furthermore, we would keep the path pretty hot and that's
not ideal if one wants to test the eratic signal behavior. So only
consider the first thread for the stats.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
v2: add brackets to make it easier to read

 src/signaltest/signaltest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
index 0bf075456ab6..a67eddaf8420 100644
--- a/src/signaltest/signaltest.c
+++ b/src/signaltest/signaltest.c
@@ -417,7 +417,7 @@ int main(int argc, char **argv)
 			pthread_kill(stat[i].thread, SIGTERM);
 		if (stat[i].threadstarted) {
 			pthread_join(stat[i].thread, NULL);
-			if (quiet)
+			if (quiet && (i == 0))
 				print_stat(&par[i], i, 0);
 		}
 		if (stat[i].values)
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [rt-tests v2 4/4] signaltest: Only print from the first thread stats when quiet
  2020-09-03 17:33 [rt-tests v2 4/4] signaltest: Only print from the first thread stats when quiet Daniel Wagner
@ 2020-09-03 17:37 ` John Kacur
  0 siblings, 0 replies; 2+ messages in thread
From: John Kacur @ 2020-09-03 17:37 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Thu, 3 Sep 2020, Daniel Wagner wrote:

> When the quiet option is used don't print all threads stats. The first
> thread will pause every 16 cycles for 10000us. This will show up in
> the max values for all other threads when the final results are
> printed:
> 
>  # signaltest -q  -D 2s
>  T: 0 ( 4517) P: 0 C:   3121 Min:      5 Act:    8 Avg:    8 Max:      19
>  T: 1 ( 4518) P: 0 C:   3121 Min:      5 Act:10065 Avg:  639 Max:   10073
> 
> We could also remove the sleep but then the system gets fully loaded
> by the test. Furthermore, we would keep the path pretty hot and that's
> not ideal if one wants to test the eratic signal behavior. So only
> consider the first thread for the stats.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
> v2: add brackets to make it easier to read
> 
>  src/signaltest/signaltest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
> index 0bf075456ab6..a67eddaf8420 100644
> --- a/src/signaltest/signaltest.c
> +++ b/src/signaltest/signaltest.c
> @@ -417,7 +417,7 @@ int main(int argc, char **argv)
>  			pthread_kill(stat[i].thread, SIGTERM);
>  		if (stat[i].threadstarted) {
>  			pthread_join(stat[i].thread, NULL);
> -			if (quiet)
> +			if (quiet && (i == 0))
>  				print_stat(&par[i], i, 0);
>  		}
>  		if (stat[i].values)
> -- 
> 2.28.0
> 
> 

Signed-off-by: John Kacur <jkacur@redhat.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-03 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 17:33 [rt-tests v2 4/4] signaltest: Only print from the first thread stats when quiet Daniel Wagner
2020-09-03 17:37 ` John Kacur

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).