Skip to content

Commit dffd2dc

Browse files
committed
cache: track timeouted fragments in FragmentationCache telemetry
1 parent a964b28 commit dffd2dc

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/plugins/storage/cache/src/fragmentationCache/fragmentationCache.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ void FragmentationCache::fill_missing_packet_data(
7474
{
7575
if (!is_fragmentation_data_timedouted(packet, fragmentation_data)) {
7676
fill_ports_to_packet(packet, fragmentation_data);
77+
} else {
78+
m_stats.timeouted_fragments++;
7779
}
7880
}
7981

@@ -104,6 +106,7 @@ telemetry::Content FragmentationCache::get_cache_telemetry()
104106
dict["fragmentedTraffic"] = telemetry::ScalarWithUnit {trafficPercentage, "%"};
105107
dict["fragmentedPackets"] = m_stats.fragmented_packets;
106108
dict["notFoundFragments"] = m_stats.not_found_fragments;
109+
dict["timeoutedFragments"] = m_stats.timeouted_fragments;
107110

108111
return dict;
109112
}

src/plugins/storage/cache/src/fragmentationCache/fragmentationCache.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class FragmentationCache : TelemetryUtils {
9494
uint64_t first_fragments;
9595
uint64_t fragmented_packets;
9696
uint64_t not_found_fragments;
97+
uint64_t timeouted_fragments;
9798
uint64_t total_packets;
9899
};
99100

0 commit comments

Comments
 (0)