Updates for SumStats API to deal with high memory stats.

- The code is a mess and will need to be cleaned up, but the
    tests do pass.
This commit is contained in:
Seth Hall 2013-08-02 12:44:33 -04:00
parent 7db531e162
commit 4f8100774c
16 changed files with 391 additions and 230 deletions

View file

@ -23,11 +23,13 @@ event bro_init() &priority=5
SumStats::create([$name="test",
$epoch=10secs,
$reducers=set(r1),
$epoch_finished(data: SumStats::ResultTable) =
$epoch_result(ts: time, key: SumStats::Key, result: SumStats::Result) =
{
print result["test.metric"]$sum;
},
$epoch_finished(ts: time) =
{
print "End of epoch handler was called";
for ( res in data )
print data[res]["test.metric"]$sum;
terminate();
},
$threshold_val(key: SumStats::Key, result: SumStats::Result) =