From cccf794265dee24f25e16f21753972b20f7593c5 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 13 Jul 2021 12:28:39 +0200 Subject: ndpiReader: add statistics about nDPI performance (#1240) The goal is to have a (roughly) idea about how many packets nDPI needs to properly classify a flow. Log this information (and guessed flows number too) during unit tests, to keep track of improvements/regressions across commits. --- example/reader_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'example/reader_util.h') diff --git a/example/reader_util.h b/example/reader_util.h index 5175e868d..28ea6029e 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -256,10 +256,12 @@ typedef struct ndpi_stats { u_int64_t protocol_counter_bytes[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; u_int32_t protocol_flows[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; u_int32_t ndpi_flow_count; + u_int32_t flow_count[3]; u_int64_t tcp_count, udp_count; u_int64_t mpls_count, pppoe_count, vlan_count, fragmented_count; u_int64_t packet_len[6]; u_int16_t max_packet_len; + u_int64_t dpi_packet_count[3]; } ndpi_stats_t; -- cgit v1.2.3