mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
logging: Implement get_delay_queue_size()
Primarily for introspection given that re-delaying may exceed queue sizes.
This commit is contained in:
parent
f0e67022fd
commit
2dbb467ba2
8 changed files with 213 additions and 0 deletions
|
@ -719,6 +719,13 @@ export {
|
|||
##
|
||||
## Returns: ``T`` on success, else ``F``.
|
||||
global set_max_delay_queue_size: function(id: Log::ID, queue_size: count): bool;
|
||||
|
||||
## Get the current size of the delay queue for a stream.
|
||||
##
|
||||
## id: The ID associated with a logging stream.
|
||||
##
|
||||
## Returns: The current size of the delay queue, or -1 on error.
|
||||
global get_delay_queue_size: function(id: Log::ID): int;
|
||||
}
|
||||
|
||||
global all_streams: table[ID] of Stream = table();
|
||||
|
@ -1066,3 +1073,8 @@ function set_max_delay_queue_size(id: Log::ID, max_size: count): bool
|
|||
|
||||
return T;
|
||||
}
|
||||
|
||||
function get_delay_queue_size(id: Log::ID): int
|
||||
{
|
||||
return Log::__get_delay_queue_size(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue