aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-07-22 17:42:23 +0200
committerGitHub <noreply@github.com>2024-07-22 17:42:23 +0200
commit65e31b0ea34c1b73639dd0d36af3674223b2af2f (patch)
tree72361b490a01a62904b0df4ce80becec068268d4 /example/ndpiReader.c
parent67f5cdafc0a704275d5f51a86b6a01fa36a69389 (diff)
FPC: small improvements (#2512)
Add printing of fpc_dns statistics and add a general cconfiguration option. Rework the code to be more generic and ready to handle other logics.
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 11ef109c6..0fa66889b 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -4052,6 +4052,10 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_insert,
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_search,
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_found);
+ printf("\tLRU cache fpc_dns: %llu/%llu/%llu (insert/search/found)\n",
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_insert,
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_search,
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_found);
printf("\tAutoma host: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.automa_stats[NDPI_AUTOMA_HOST].n_search,
@@ -4149,6 +4153,10 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_insert,
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_search,
(long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_MSTEAMS].n_found);
+ fprintf(results_file, "LRU cache fpc_dns: %llu/%llu/%llu (insert/search/found)\n",
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_insert,
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_search,
+ (long long unsigned int)cumulative_stats.lru_stats[NDPI_LRUCACHE_FPC_DNS].n_found);
fprintf(results_file, "Automa host: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.automa_stats[NDPI_AUTOMA_HOST].n_search,