Commit 7e556b26 authored by Joanne Hugé's avatar Joanne Hugé

Improve statistics display

parent 0d43af0a
...@@ -221,16 +221,27 @@ int main(int argc, char *argv[]) { ...@@ -221,16 +221,27 @@ int main(int argc, char *argv[]) {
if (main_params.verbose) { if (main_params.verbose) {
if (tsn_task == RTT_TASK) { if (tsn_task == RTT_TASK) {
printf("%10" PRIu64 ": RTT: %4d %4d %4d\n", nb_cycles, rtt_stats.min_rtt, printf("%9" PRIu64 ": RTT: %4d %4d %4d\n", nb_cycles, rtt_stats.min_rtt,
rtt_stats.avg_rtt, rtt_stats.avg_rtt,
rtt_stats.max_rtt); rtt_stats.max_rtt);
printf("\033[%dA", 1); printf("\033[%dA", 1);
} else if (enable_timestamps) { } else {
printf("%9" PRIu64 ": [%4d, %4d]",
nb_cycles,
(int) egress_stats.invalid_parameter,
(int) egress_stats.missed_deadline);
printf("%10" PRIu64 ": K: %4d %4d %4d\n", if (enable_timestamps) {
nb_cycles, egress_stats.min_kernel_latency, printf(", K: %4d %4d %4d [%4d]\n",
egress_stats.min_kernel_latency,
egress_stats.avg_kernel_latency, egress_stats.avg_kernel_latency,
egress_stats.max_kernel_latency); egress_stats.max_kernel_latency,
(int) egress_stats.high_kernel_latency);
}
else {
printf("\n");
}
printf("\033[%dA", 1); printf("\033[%dA", 1);
} }
} }
......
...@@ -227,20 +227,22 @@ int main(int argc, char *argv[]) { ...@@ -227,20 +227,22 @@ int main(int argc, char *argv[]) {
int jitter = ingress_stats.max_interval - ingress_stats.min_interval; int jitter = ingress_stats.max_interval - ingress_stats.min_interval;
printf("%9" PRIu64 ": J: %5d, I (ms): %3d %3d %3d", printf("%9" PRIu64 ": J: %5d, I (ms): %3d %3d %3d [%3d,%3d]",
ingress_stats.packets_received, ingress_stats.packets_received,
jitter, jitter,
ingress_stats.min_interval / 1000, ingress_stats.min_interval / 1000,
ingress_stats.avg_interval / 1000, ingress_stats.avg_interval / 1000,
ingress_stats.max_interval / 1000); ingress_stats.max_interval / 1000,
(int) ingress_stats.high_jitter,
(int) ingress_stats.lost_packets);
if (enable_timestamps) { if (enable_timestamps) {
printf(", K : %4d %4d %4d, L: %4d\n", printf(", K: %4d %4d %4d [%3d]\n",
ingress_stats.min_kernel_latency, ingress_stats.min_kernel_latency,
ingress_stats.avg_kernel_latency, ingress_stats.avg_kernel_latency,
ingress_stats.max_kernel_latency, ingress_stats.max_kernel_latency,
ingress_stats.lost_packets); (int) ingress_stats.high_kernel_latency);
} else { } else {
printf("\n"); printf("\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