Skip to content

Commit 5a9e20f

Browse files
Merge pull request #244 from Zadamsa/biflow-aggregator-ontime-exports
Biflow aggregator ontime exports
2 parents 5ef7aa4 + 74bcae9 commit 5a9e20f

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

biflow_aggregator/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ do_mainloop(Configuration& config)
419419
while (unlikely(stop == false)) {
420420

421421
// Check timeouted flows
422-
for (node<agg::Timeout_data> *t_data = dll.begin(); t_data != NULL; t_data = t_data->next) {
422+
for (node<agg::Timeout_data> *t_data = dll.begin(); !flush_configuration.is_set() && t_data != NULL; t_data = t_data->next) {
423423
if (time_last >= t_data->value.passive_timeout) { // timeouted
424424
auto data = agg.flow_cache.find(t_data->value.key);
425425
proccess_and_send(agg, data->first, data->second, out_tmplt, out_rec);
@@ -486,7 +486,7 @@ do_mainloop(Configuration& config)
486486
time_last = ur_time_get_sec(ur_get(in_tmplt, in_data, F_TIME_LAST));
487487

488488
// Check timeouted flows
489-
for (node<agg::Timeout_data> *t_data = dll.begin(); t_data != NULL; t_data = t_data->next) {
489+
for (node<agg::Timeout_data> *t_data = dll.begin(); !flush_configuration.is_set() && t_data != NULL; t_data = t_data->next) {
490490
if (time_first >= t_data->value.passive_timeout || time_last >= t_data->value.active_timeout) { // timeouted
491491
auto data = agg.flow_cache.find(t_data->value.key);
492492
proccess_and_send(agg, data->first, data->second, out_tmplt, out_rec);

biflow_aggregator/tests/inputs/input2_packet_aggregation

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ipaddr DST_IP,ipaddr SRC_IP,uint32 PACKETS,time TIME_FIRST,time TIME_LAST
33
192.168.1.5,192.168.1.6,666,2016-10-28T17:00:3.0,2016-10-28T17:00:11.0
44
192.168.1.8,192.168.1.9,10,2016-10-28T17:00:13.0,2016-10-28T17:00:17.0
55
192.168.1.8,192.168.1.9,17,2016-10-28T17:00:21.0,2016-10-28T17:00:23.0
6-
192.168.1.8,192.168.1.9,53,2016-10-28T17:00:26.0,2016-10-28T17:00:41.0
6+
192.168.1.8,192.168.1.9,53,2016-10-28T17:00:26.0,2016-10-28T17:00:51.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
2016-10-28T17:00:01.000000,2016-10-28T17:00:23.000000,4,694
2-
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
2+
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53

biflow_aggregator/tests/references/reference2_gt5a

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
2016-10-28T17:00:03.000000,2016-10-28T17:00:11.000000,1,666
33
2016-10-28T17:00:13.000000,2016-10-28T17:00:17.000000,1,10
44
2016-10-28T17:00:21.000000,2016-10-28T17:00:23.000000,1,17
5-
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
5+
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
2016-10-28T17:00:01.000000,2016-10-28T17:00:11.000000,2,667
22
2016-10-28T17:00:13.000000,2016-10-28T17:00:17.000000,1,10
33
2016-10-28T17:00:21.000000,2016-10-28T17:00:23.000000,1,17
4-
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
4+
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53

0 commit comments

Comments
 (0)