logging: Implement get_delay_queue_size()

Primarily for introspection given that re-delaying may exceed
queue sizes.
This commit is contained in:
Arne Welzel 2023-11-23 21:09:41 +01:00
parent f0e67022fd
commit 2dbb467ba2
8 changed files with 213 additions and 0 deletions

View file

@ -1312,6 +1312,14 @@ bool Manager::SetMaxDelayInterval(const EnumValPtr& id, double delay) {
return true;
}
zeek_int_t Manager::GetDelayQueueSize(const EnumValPtr& id) {
Stream* stream = FindStream(id.get());
if ( ! stream )
return -1;
return stream->delay_queue.size();
}
bool Manager::SetMaxDelayQueueSize(const EnumValPtr& id, zeek_uint_t queue_size) {
Stream* stream = FindStream(id.get());
if ( ! stream )