diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-07-29 12:07:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 12:07:41 +0200 |
commit | bb83899985c25097341b947c2c535f56254a075c (patch) | |
tree | 8f40308c2e4885fc41bd5db5a233cb6956ad7697 /example/reader_util.h | |
parent | 95e16872fadfc98256fdcf729f267237c727e4c3 (diff) |
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.
Diffstat (limited to 'example/reader_util.h')
-rw-r--r-- | example/reader_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/example/reader_util.h b/example/reader_util.h index 4f4ef68fe..e73df42b2 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -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; |