mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08: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
|
@ -1,3 +1,4 @@
|
|||
@load base/utils/queue
|
||||
|
||||
module Measurement;
|
||||
|
||||
|
@ -29,7 +30,10 @@ hook add_to_reducer_hook(r: Reducer, val: double, data: DataPoint, rv: ResultVal
|
|||
{
|
||||
if ( ! rv?$sample_queue )
|
||||
rv$sample_queue = Queue::init([$max_len=r$samples]);
|
||||
Queue::push(rv$sample_queue, data$str);
|
||||
if ( ! rv?$samples )
|
||||
rv$samples = vector();
|
||||
Queue::put(rv$sample_queue, data);
|
||||
Queue::get_vector(rv$sample_queue, rv$samples);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue