mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Doing some code reorganization and small changes to hopefully fix a memory issue.
This commit is contained in:
parent
6e9e3a5e88
commit
9c00ef3ccd
2 changed files with 27 additions and 25 deletions
|
@ -227,7 +227,7 @@ export {
|
|||
}
|
||||
|
||||
redef record Filter += {
|
||||
# The metric that this filter applies to. The value is automatically set.
|
||||
# Internal use only. The metric that this filter applies to. The value is automatically set.
|
||||
id: string &optional;
|
||||
};
|
||||
|
||||
|
@ -263,7 +263,7 @@ global metric_filters: table[string] of vector of Filter = table();
|
|||
global filter_store: table[string, string] of Filter = table();
|
||||
|
||||
# This is indexed by metric id and filter name.
|
||||
global store: table[string, string] of MetricTable = table() &default=table();
|
||||
global store: table[string, string] of MetricTable = table();
|
||||
|
||||
# This is a hook for watching thresholds being crossed. It is called whenever
|
||||
# index values are updated and the new val is given as the `val` argument.
|
||||
|
@ -427,6 +427,9 @@ function write_log(ts: time, metric_name: string, filter_name: string, data: Met
|
|||
|
||||
function reset(filter: Filter)
|
||||
{
|
||||
if ( [filter$id, filter$name] in store )
|
||||
delete store[filter$id, filter$name];
|
||||
|
||||
store[filter$id, filter$name] = table();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue