Commit 7a062c3f authored by Hongzhan Chen's avatar Hongzhan Chen Committed by Jan Kiszka
Browse files

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
Signed-off-by: default avatarHongzhan Chen <>
[Jan: tuning of wording and output format]
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 0aee6f6e
......@@ -482,6 +482,19 @@ static void print_hist(void)
int i;
if (ti.total_cycles < (ti.max_cycles - 1)) {
* Test is interrupted. Force to calculate
* even though it is not accurate but to avoid
* large latency surprising us.
printf("\nTest 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("# Inner Loop Histogram\n");
printf("# Inner Loop latency is the latency in kernel space\n"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment