Patricia tree, Ahocarasick automa, LRU cache: add statistics (#1683)

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; enabled by default in the
unit tests.
This new option enables/disables dumping of "num dissectors calls"
values, too (see b4cb14ec).
This commit is contained in:
Ivan Nardi
2022-07-29 15:25:00 +02:00
committed by GitHub
parent df2e11ef51
commit 405a52ed65
369 changed files with 5773 additions and 18 deletions
+15
View File
@@ -7,6 +7,21 @@ Confidence Match by port : 5 (flows)
Confidence Match by IP : 9 (flows)
Confidence DPI : 146 (flows)
Num dissector calls: 536 (3.35 diss/flow)
LRU cache ookla: 0/0/0 (insert/search/found)
LRU cache bittorrent: 0/0/0 (insert/search/found)
LRU cache zoom: 0/0/0 (insert/search/found)
LRU cache stun: 0/0/0 (insert/search/found)
LRU cache tls_cert: 0/0/0 (insert/search/found)
LRU cache mining: 0/0/0 (insert/search/found)
LRU cache msteams: 0/0/0 (insert/search/found)
Automa host: 199/189 (search/found)
Automa domain: 166/0 (search/found)
Automa tls cert: 0/0 (search/found)
Automa risk mask: 82/0 (search/found)
Automa common alpns: 48/48 (search/found)
Patricia risk mask: 356/0 (search/found)
Patricia risk: 2/0 (search/found)
Patricia protocols: 476/244 (search/found)
DNS 4 400 2
DHCP 3 1056 2