testsuite/gpiobench: Do calculate avg latency once when test is interrupted
PATCH 1/1 testsuite/gpiobench: Do calculate avg latency once when test is interrupted
When test is interrupted, avg latency need to be calcuated once to avoid large latency showing even though it may not be quite accurate.
Signed-off-by Hongzhan Chen <[email protected]>
testsuite/gpiobench/gpiobench.c +12 -0
@@ -482,6 +482,18 @@ static void print_hist(void) {int i; +if (ti.total_cycles < (ti.max_cycles -1 )) { +/* test is interrupted and force to calculate +* even though it is not accurate but to avoid +* large latency surprising us. +*/ +printf ("test is interrupted and exit exceptionally\n" ); +printf ("Please run again till it exit normally\n" ); + + ti.ts.inner_avg /= (ti.total_cycles *2 ); + ti.ts.outer_avg /= (ti.total_cycles *2 ); + + }printf ("\n" );printf ("# Inner Loop Histogram\n" ); printf("# Inner Loop latency is the latency in kernel space\n"
Signature · 1 line
2.17.1
Jan Kiszka
AppliedQuoted 20 lines · Hongzhan Chen via Xenomai
When test is interrupted, avg latency need to be calcuated once to avoid large latency showing even though it may not be quite accurate.
Signed-off-by Hongzhan Chen <[email protected]>testsuite/gpiobench/gpiobench.c +5
-0@@ -482,6 +482,18 @@ static void print_hist(void) {int i; +if (ti.total_cycles < (ti.max_cycles -1 )) { +/* test is interrupted and force to calculate +* even though it is not accurate but to avoid +* large latency surprising us. +*/
testsuite/gpiobench/gpiobench.c static void print_hist(void) · line 499
Quoted 10 lines
testsuite/gpiobench/gpiobench.c +7
-0+printf ("test is interrupted and exit exceptionally\n" ); +printf ("Please run again till it exit normally\n" ); + + ti.ts.inner_avg /= (ti.total_cycles *2 ); + ti.ts.outer_avg /= (ti.total_cycles *2 ); + + }printf ("\n" );printf ("# Inner Loop Histogram\n" ); printf("# Inner Loop latency is the latency in kernel space\n"
Thanks, applied.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Hongzhan Chen via Xenomai
When test is interrupted, avg latency need to be calcuated once to avoid large latency showing even though it may not be quite accurate.
Signed-off-by Hongzhan Chen <[email protected]>testsuite/gpiobench/gpiobench.c +5
-0@@ -482,6 +482,18 @@ static void print_hist(void) {int i; +if (ti.total_cycles < (ti.max_cycles -1 )) { +/* test is interrupted and force to calculate +* even though it is not accurate but to avoid +* large latency surprising us. +*/ testsuite/gpiobench/gpiobench.c static void print_hist(void) · line 499
Quoted 10 lines
testsuite/gpiobench/gpiobench.c +7
-0+printf ("test is interrupted and exit exceptionally\n" ); +printf ("Please run again till it exit normally\n" ); + + ti.ts.inner_avg /= (ti.total_cycles *2 ); + ti.ts.outer_avg /= (ti.total_cycles *2 ); + + }printf ("\n" );printf ("# Inner Loop Histogram\n" ); printf("# Inner Loop latency is the latency in kernel space\n"Thanks, applied.
Quoted 2 lines
Jan
...with some tuning of the wording and the newline. See next.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux