]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
server: log how long final timerDB dump took
authorLibor Peltan <libor.peltan@nic.cz>
Sun, 28 Dec 2025 09:42:40 +0000 (10:42 +0100)
committerLibor Peltan <libor.peltan@nic.cz>
Mon, 29 Dec 2025 10:36:57 +0000 (11:36 +0100)
src/knot/server/server.c

index d44bb6daace0dc1c20ff16f919526f0600255640..e632056d6678e92d4fabd11ef65440620b9741d1 100644 (file)
@@ -1087,11 +1087,15 @@ void server_deinit(server_t *server)
        bool should_sync = (conf()->cache.db_timer_db_sync == TIMER_DB_SYNC_SHUTDOWN ||
                            conf()->cache.db_timer_db_sync > 0);
        if (should_sync && server->zone_db != NULL) {
-               log_info("updating persistent timer DB");
+               struct timespec beg = time_now();
                int ret = zone_timers_write_all(&server->timerdb, server->zone_db);
+               char dur_str[64] = "";
+               duration_to_str(dur_str, &beg);
                if (ret != KNOT_EOK) {
-                       log_error("failed to update persistent timer DB (%s)",
-                                 knot_strerror(ret));
+                       log_error("failed to update persistent timer DB%s (%s)",
+                                 dur_str, knot_strerror(ret));
+               } else {
+                       log_info("updated persistent timer DB%s", dur_str);
                }
        }