Commit 44a99d81 authored by Joanne Hugé's avatar Joanne Hugé

Print min max and avg in diff_ts histogram

Fix mistake in print_histogram function
parent 9ef4fea2
......@@ -435,7 +435,7 @@ static void print_histograms() {
printf("# Packet TX timestamps histogram\n");
for (int j = 0; j < max_hist_val; j++)
for (int j = 0; j <= max_hist_val; j++)
printf("%06d %015" PRIi64 "\n", j, histogram[j]);
printf(
......
......@@ -497,13 +497,16 @@ static void print_histograms() {
max_latency = histogram_max(diff_ts_hist, MAX_DIFF_TS - 1);
for (int j = 0; j < max_latency; j++)
for (int j = 0; j <= max_latency; j++)
printf(" %06d %015" PRIi64 "\n", j, diff_ts_hist[j]);
printf(
"# Duration: %dh%d\n"
"# Lost packets: %" PRIu64 "\n",
duration_hour, duration_minutes, high_diff_ts);
"# Lost packets: %" PRIu64 "\n"
"# Min: %" PRIi64 "\n"
"# Max: %" PRIi64 "\n"
"# Avg: %" PRIi64 "\n",
duration_hour, duration_minutes, high_diff_ts, min_diff_ts, max_diff_ts, avg_diff_ts);
}
else {
......@@ -515,7 +518,7 @@ static void print_histograms() {
printf("# Packet RX timestamps histogram\n");
for (int j = 0; j < max_latency; j++)
for (int j = 0; j <= max_latency; j++)
printf(" %06d %015" PRIi64 "\n", j, kernel_latency_hist[j]);
printf(
......@@ -527,7 +530,7 @@ static void print_histograms() {
printf("# Packet jitter histogram\n");
for (int j = min_jitter; j < max_jitter; j++)
for (int j = min_jitter; j <= max_jitter; j++)
printf(" %06d %015" PRIi64 "\n", j, jitter_hist[j]);
printf(
......
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