mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Measurement framework is ready for testing.
- New, expanded API. - Calculations moved into plugins. - Scripts using measurement framework ported. - Updated the script-land queue implementation to make it more generic. -
This commit is contained in:
parent
93eca70e6b
commit
b477d2b02d
11 changed files with 183 additions and 186 deletions
|
@ -255,6 +255,11 @@ function reset(m: Measurement)
|
|||
|
||||
function create(m: Measurement)
|
||||
{
|
||||
if ( (m?$threshold || m?$threshold_series) && ! m?$threshold_val )
|
||||
{
|
||||
Reporter::error("Measurement given a threshold with no $threshold_val function");
|
||||
}
|
||||
|
||||
if ( ! m?$id )
|
||||
m$id=unique_id("");
|
||||
local tmp: table[Key] of Thresholding = table();
|
||||
|
@ -365,9 +370,6 @@ function threshold_crossed(m: Measurement, key: Key, result: Result)
|
|||
if ( ! m?$threshold_crossed )
|
||||
return;
|
||||
|
||||
#if ( val?$sample_queue )
|
||||
# val$samples = Queue::get_str_vector(val$sample_queue);
|
||||
|
||||
# Add in the extra ResultVals to make threshold_crossed callbacks easier to write.
|
||||
if ( |m$reducers| != |result| )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue