]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Update time before and after aggregation
authorIgor Putovny <igor.putovny@nic.cz>
Wed, 10 Jul 2024 13:10:57 +0000 (15:10 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Wed, 10 Jul 2024 13:10:57 +0000 (15:10 +0200)
proto/aggregator/aggregator.c

index 6ec9dd8d7020b9ac2b3f521777ec7149725a9d8b..13e25302434da72017981f7263a29e65dadb2af8 100644 (file)
@@ -908,12 +908,16 @@ static void
 run_aggregation(struct aggregator_proto *p)
 {
   assert(p->root != NULL);
-  log("==== AGGREGATION START ====");
 
+  times_update(&main_timeloop);
+
+  log("==== AGGREGATION START ====");
   construct_trie(p);
   calculate_trie(p);
   collect_prefixes(p);
 
+  times_update(&main_timeloop);
+
   log("%d prefixes before aggregation", p->before_count);
   log("%d prefixes after aggregation", p->after_count);
   log("%d internal nodes with bucket", p->internal_nodes);
@@ -1366,6 +1370,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
 
     /* Evaluate route attributes. */
     struct aggregator_bucket *tmp_bucket = lp_allocz(p->bucket_pool, sizeof(*tmp_bucket));
+    assert(tmp_bucket->id == 0);
 
     for (uint val_idx = 0; val_idx < p->aggr_on_count; val_idx++)
     {
@@ -1648,6 +1653,7 @@ trie_init(struct aggregator_proto *p)
 
   /* Allocate bucket for root node */
   struct aggregator_bucket *new_bucket = lp_allocz(p->bucket_pool, sizeof(*new_bucket));
+  assert(new_bucket->id == 0);
   u64 haux = 0;
   mem_hash_init(&haux);
   new_bucket->hash = mem_hash_value(&haux);