]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2380] showed the number of loaded RRs and loading time, best effort basis.
authorJINMEI Tatuya <jinmei@isc.org>
Tue, 18 Dec 2012 04:46:28 +0000 (20:46 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Tue, 18 Dec 2012 04:51:15 +0000 (20:51 -0800)
src/bin/loadzone/loadzone.py.in
src/bin/loadzone/loadzone_messages.mes

index 5b8f69d578d73f098d6c8af06b8e4409a7dbb889..3fff28f2ad232513d4523c7a8805f13d16e169db 100755 (executable)
@@ -284,7 +284,9 @@ class LoadZoneRunner:
             self._set_signal_handlers()
             self._parse_args()
             self._do_load()
-            logger.info(LOADZONE_DONE, self._zone_name, self._zone_class)
+            total_elapsed_txt = "%.2f" % (time.time() - self.__start_time)
+            logger.info(LOADZONE_DONE, self.__loaded_rrs, self._zone_name,
+                        self._zone_class, total_elapsed_txt)
             self._post_load_checks()
             return 0
         except BadArgument as ex:
index 3cbd6fded92af1056c6c8b0ce0d6a851a38530b1..3dfdaa51bafec49f9481e20b70e0886932797ac3 100644 (file)
@@ -27,9 +27,16 @@ LOADZONE_ZONE_CREATED), but the loading operation has subsequently
 failed.  The newly created zone has been removed from the data source,
 so that the data source will go back to the original state.
 
-% LOADZONE_DONE Load zone %1/%2 completed
+% LOADZONE_DONE Loadded (at least) %1 RRs into zone %2/%3 in %4 seconds
 b10-loadzone has successfully loaded the specified zone.  If there was
 an old version of the zone in the data source, it is now deleted.
+It also prints (a lower bound of) the number of RRs that have been loaded
+and the time spent for the loading.  Due to a limitation of the
+current implementation of the underlying library however, it cannot show the
+exact number of the loaded RRs; it's counted for every N-th RR where N
+is the value of the -i command line option.  So, for smaller zones that
+don't even contain N RRs, the reported value will be 0.  This will be
+improved in a future version.
 
 % LOADZONE_LOAD_ERROR Failed to load zone %1/%2: %3
 Loading a zone by b10-loadzone fails for some reason in the middle of