Patricia tree, Ahocarasick automa, LRU cache: add statistics (#1677)
Add (basic) internal stats to the main data structures used by the library; they might be usefull to check how effective these structures are. Add an option to `ndpiReader` to dump them; disabled by default to avoid too much fuss with the unit tests.
This commit is contained in:
@@ -298,6 +298,10 @@ typedef struct ndpi_stats {
|
||||
u_int64_t dpi_packet_count[3];
|
||||
u_int64_t flow_confidence[NDPI_CONFIDENCE_MAX];
|
||||
u_int64_t num_dissector_calls;
|
||||
|
||||
struct ndpi_lru_cache_stats lru_stats[NDPI_LRUCACHE_MAX];
|
||||
struct ndpi_automa_stats automa_stats[NDPI_AUTOMA_MAX];
|
||||
struct ndpi_patricia_tree_stats patricia_stats[NDPI_PTREE_MAX];
|
||||
} ndpi_stats_t;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user