From: Igor Putovny Date: Wed, 10 Jul 2024 13:10:57 +0000 (+0200) Subject: Update time before and after aggregation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3edc3b3a5b0f94a0bfd325dcc42917891a5c85cc;p=thirdparty%2Fbird.git Update time before and after aggregation --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 6ec9dd8d7..13e253024 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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);