]> source.dussan.org Git - rspamd.git/commitdiff
Output some statistics about maps.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 May 2015 13:04:31 +0000 (14:04 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 May 2015 13:04:31 +0000 (14:04 +0100)
src/libutil/map.c

index c2de77eada753cb02153df4181cd4ae7a19ea8c4..3fe7495b31f982f6f6af0dc343c8ec0c3110db30 100644 (file)
@@ -829,6 +829,9 @@ rspamd_hosts_fin (rspamd_mempool_t * pool, struct map_cb_data *data)
        if (data->prev_data) {
                g_hash_table_destroy (data->prev_data);
        }
+       if (data->cur_data) {
+               msg_info ("read hash of %z elements", g_hash_table_size (data->cur_data));
+       }
 }
 
 gchar *
@@ -854,6 +857,9 @@ rspamd_kv_list_fin (rspamd_mempool_t * pool, struct map_cb_data *data)
        if (data->prev_data) {
                g_hash_table_destroy (data->prev_data);
        }
+       if (data->cur_data) {
+               msg_info ("read hash of %z elements", g_hash_table_size (data->cur_data));
+       }
 }
 
 gchar *
@@ -878,4 +884,7 @@ rspamd_radix_fin (rspamd_mempool_t * pool, struct map_cb_data *data)
        if (data->prev_data) {
                radix_destroy_compressed (data->prev_data);
        }
+       if (data->cur_data) {
+               msg_info ("read radix trie of %z elements", radix_get_size (data->cur_data));
+       }
 }