packet_analysis/Manager: Rename GetUnprocessedCount() to PacketsUnprocessed()

Mostly to align with PacketsProcessed()
This commit is contained in:
Arne Welzel 2025-07-28 13:41:30 +02:00
parent 7894d88461
commit fa476746bf
2 changed files with 9 additions and 4 deletions

View file

@ -357,8 +357,8 @@ void get_final_stats() {
double dropped_pct = s.dropped > 0 ? pct(s.dropped, s.received) : 0.0; double dropped_pct = s.dropped > 0 ? pct(s.dropped, s.received) : 0.0;
uint64_t not_processed = packet_mgr->GetUnprocessedCount(); uint64_t unprocessed = packet_mgr->PacketsUnprocessed();
double unprocessed_pct = not_processed > 0 ? ((double)not_processed / (double)s.received) * 100.0 : 0.0; double unprocessed_pct = unprocessed > 0 ? ((double)unprocessed / (double)s.received) * 100.0 : 0.0;
std::string filtered = ""; std::string filtered = "";
if ( s.filtered ) { if ( s.filtered ) {
@ -368,7 +368,7 @@ void get_final_stats() {
reporter->Info("%" PRIu64 " packets received on interface %s, %" PRIu64 " (%.2f%%) dropped, %" PRIu64 reporter->Info("%" PRIu64 " packets received on interface %s, %" PRIu64 " (%.2f%%) dropped, %" PRIu64
" (%.2f%%) not processed%s", " (%.2f%%) not processed%s",
s.received, ps->Path().c_str(), s.dropped, dropped_pct, not_processed, unprocessed_pct, s.received, ps->Path().c_str(), s.dropped, dropped_pct, unprocessed, unprocessed_pct,
filtered.c_str()); filtered.c_str());
} }
} }

View file

@ -169,11 +169,16 @@ public:
return pkt_filter; return pkt_filter;
} }
[[deprecated("Remove in v8.1: Use PacketsUnprocessed() instead.")]]
uint64_t GetUnprocessedCount() const {
return PacketsUnprocessed();
}
/** /**
* Returns the total number of packets received that weren't considered * Returns the total number of packets received that weren't considered
* processed by some analyzer. * processed by some analyzer.
*/ */
uint64_t GetUnprocessedCount() const { return total_not_processed; } uint64_t PacketsUnprocessed() const { return total_not_processed; }
/** /**
* Tracks the given analyzer for the current packet's analyzer history. * Tracks the given analyzer for the current packet's analyzer history.