+ /* Now wait for the sessions to finish... */
+ vlib_process_wait_for_event_or_clock (vm, cli_timeout);
+ event_type = vlib_process_get_events (vm, &event_data);
+
+ switch (event_type)
+ {
+ case ~0:
+ vlib_cli_output (vm, "Timeout with %d sessions still active...",
+ tm->ready_connections);
+ goto cleanup;
+
+ case 2:
+ vlib_cli_output (vm, "Test finished at %.6f", tm->test_end_time);
+ break;
+
+ default:
+ vlib_cli_output (vm, "unexpected event(2): %d", event_type);
+ goto cleanup;
+ }
+
+ delta = tm->test_end_time - tm->test_start_time;
+
+ if (delta != 0.0)
+ {
+ vlib_cli_output (vm,
+ "%lld bytes (%lld mbytes, %lld gbytes) in %.2f seconds",
+ tm->rx_total, tm->rx_total / (1ULL << 20),
+ tm->rx_total / (1ULL << 30), delta);
+ vlib_cli_output (vm, "%.2f bytes/second full-duplex",
+ ((f64) tm->rx_total) / (delta));
+ vlib_cli_output (vm, "%.4f gbit/second full-duplex",
+ (((f64) tm->rx_total * 8.0) / delta / 1e9));
+ }
+ else
+ vlib_cli_output (vm, "zero delta-t?");
+
+cleanup:
+ pool_free (tm->sessions);
+ for (i = 0; i < vec_len (tm->connection_index_by_thread); i++)
+ vec_reset_length (tm->connection_index_by_thread[i]);