From: JINMEI Tatuya Date: Tue, 18 Dec 2012 04:46:28 +0000 (-0800) Subject: [2380] showed the number of loaded RRs and loading time, best effort basis. X-Git-Tag: bind10-1.0.0-beta-release~9^2~14^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed47bd72388da8de0ab5e92d44da12942ba49b35;p=thirdparty%2Fkea.git [2380] showed the number of loaded RRs and loading time, best effort basis. --- diff --git a/src/bin/loadzone/loadzone.py.in b/src/bin/loadzone/loadzone.py.in index 5b8f69d578..3fff28f2ad 100755 --- a/src/bin/loadzone/loadzone.py.in +++ b/src/bin/loadzone/loadzone.py.in @@ -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: diff --git a/src/bin/loadzone/loadzone_messages.mes b/src/bin/loadzone/loadzone_messages.mes index 3cbd6fded9..3dfdaa51ba 100644 --- a/src/bin/loadzone/loadzone_messages.mes +++ b/src/bin/loadzone/loadzone_messages.mes @@ -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