Browse Source

[2252] rename the item name and update descriptions

rename the item name "time_to_xxxx" to "latest_xxxx_duration", and
update descriptions of them. This is for addressing the reviewer's
comment.
Naoki Kambe 12 years ago
parent
commit
75445a1c6e

+ 4 - 4
src/bin/xfrin/b10-xfrin.xml

@@ -295,16 +295,16 @@ operation
                   </varlistentry>
                   </varlistentry>
 
 
                   <varlistentry>
                   <varlistentry>
-                    <term>time_to_ixfr</term>
+                    <term>latest_ixfr_duration</term>
                     <listitem><simpara>
                     <listitem><simpara>
-                      Elapsed time in second to do the last IXFR
+                      Duration of the latest IXFR
                     </simpara></listitem>
                     </simpara></listitem>
                   </varlistentry>
                   </varlistentry>
 
 
                   <varlistentry>
                   <varlistentry>
-                    <term>time_to_axfr</term>
+                    <term>latest_axfr_duration</term>
                     <listitem><simpara>
                     <listitem><simpara>
-                      Elapsed time in second to do the last AXFR
+                      Duration of the latest AXFR
                     </simpara></listitem>
                     </simpara></listitem>
                   </varlistentry>
                   </varlistentry>
 
 

+ 2 - 2
src/bin/xfrin/tests/xfrin_test.py

@@ -1479,7 +1479,7 @@ class TestAXFR(TestXfrinConnection):
                           TEST_ZONE_NAME_STR, 'xfrsuccess')
                           TEST_ZONE_NAME_STR, 'xfrsuccess')
         self.assertRaises(isc.cc.data.DataNotFoundError,
         self.assertRaises(isc.cc.data.DataNotFoundError,
                           self.conn._counters.get, 'zones',
                           self.conn._counters.get, 'zones',
-                          TEST_ZONE_NAME_STR, 'time_to_axfr')
+                          TEST_ZONE_NAME_STR, 'latest_axfr_duration')
         self.assertEqual(self.conn.do_xfrin(False), XFRIN_OK)
         self.assertEqual(self.conn.do_xfrin(False), XFRIN_OK)
         self.assertFalse(self.conn._datasrc_client._journaling_enabled)
         self.assertFalse(self.conn._datasrc_client._journaling_enabled)
 
 
@@ -1512,7 +1512,7 @@ class TestAXFR(TestXfrinConnection):
                                                  'xfrsuccess'))
                                                  'xfrsuccess'))
         self.assertGreaterEqual(self.conn._counters.get('zones',
         self.assertGreaterEqual(self.conn._counters.get('zones',
                                                         TEST_ZONE_NAME_STR,
                                                         TEST_ZONE_NAME_STR,
-                                                        'time_to_axfr'),
+                                                        'latest_axfr_duration'),
                                 0.0)
                                 0.0)
 
 
     def test_do_xfrin_with_tsig(self):
     def test_do_xfrin_with_tsig(self):

+ 2 - 2
src/bin/xfrin/xfrin.py.in

@@ -955,7 +955,7 @@ class XfrinConnection(asyncore.dispatcher):
 
 
             # start statistics timer
             # start statistics timer
             self._counters.start_timer('zones', self._zone_name.to_text(),
             self._counters.start_timer('zones', self._zone_name.to_text(),
-                                       'time_to_' + req_str.lower())
+                                       'latest_' + req_str.lower() + '_duration')
             logger.info(XFRIN_XFR_TRANSFER_STARTED, req_str, self.zone_str())
             logger.info(XFRIN_XFR_TRANSFER_STARTED, req_str, self.zone_str())
             self._send_query(self._request_type)
             self._send_query(self._request_type)
             # count (A|X)IXFR requests for statistics
             # count (A|X)IXFR requests for statistics
@@ -989,7 +989,7 @@ class XfrinConnection(asyncore.dispatcher):
                            )
                            )
             # stop statistics timer
             # stop statistics timer
             self._counters.stop_timer('zones', self._zone_name.to_text(),
             self._counters.stop_timer('zones', self._zone_name.to_text(),
-                                      'time_to_' + req_str.lower())
+                                      'latest_' + req_str.lower() + '_duration')
 
 
         except XfrinZoneUptodate:
         except XfrinZoneUptodate:
             # Eventually we'll probably have to treat this case as a trigger
             # Eventually we'll probably have to treat this case as a trigger

+ 8 - 8
src/bin/xfrin/xfrin.spec

@@ -110,8 +110,8 @@
 	    "ixfrreqv6": 0,
 	    "ixfrreqv6": 0,
 	    "xfrsuccess": 0,
 	    "xfrsuccess": 0,
 	    "xfrfail": 0,
 	    "xfrfail": 0,
-	    "time_to_ixfr": 0.0,
-	    "time_to_axfr": 0.0
+	    "latest_ixfr_duration": 0.0,
+	    "latest_axfr_duration": 0.0
           }
           }
         },
         },
         "item_title": "Zone names",
         "item_title": "Zone names",
@@ -189,20 +189,20 @@
               "item_description": "Number of zone transfer requests failed"
               "item_description": "Number of zone transfer requests failed"
             },
             },
             {
             {
-              "item_name": "time_to_ixfr",
+              "item_name": "latest_ixfr_duration",
               "item_type": "real",
               "item_type": "real",
               "item_optional": false,
               "item_optional": false,
               "item_default": 0.0,
               "item_default": 0.0,
-              "item_title": "Time to IXFR",
-              "item_description": "Elapsed time in seconds to do the last IXFR"
+              "item_title": "Latest IXFR duration",
+              "item_description": "Duration of the latest IXFR"
             },
             },
             {
             {
-              "item_name": "time_to_axfr",
+              "item_name": "latest_axfr_duration",
               "item_type": "real",
               "item_type": "real",
               "item_optional": false,
               "item_optional": false,
               "item_default": 0.0,
               "item_default": 0.0,
-              "item_title": "Time to AXFR",
-              "item_description": "Elapsed time in seconds to do the last AXFR"
+              "item_title": "Latest AXFR duration",
+              "item_description": "Duration of the latest AXFR"
             }
             }
           ]
           ]
         }
         }

+ 2 - 2
src/lib/python/isc/statistics/counters.py

@@ -217,8 +217,8 @@ class Counters():
         zones/example.com./ixfrreqv6
         zones/example.com./ixfrreqv6
         zones/example.com./xfrsuccess
         zones/example.com./xfrsuccess
         zones/example.com./xfrfail
         zones/example.com./xfrfail
-        zones/example.com./time_to_ixfr
-        zones/example.com./time_to_axfr
+        zones/example.com./latest_ixfr_duration
+        zones/example.com./latest_axfr_duration
         ixfr_running
         ixfr_running
         axfr_running
         axfr_running
         socket/unixdomain/open
         socket/unixdomain/open

+ 2 - 2
src/lib/python/isc/statistics/tests/counters_test.py

@@ -197,7 +197,7 @@ class BaseTestCounters():
         # for per-zone counters
         # for per-zone counters
         for name in self.counters._zones_item_list:
         for name in self.counters._zones_item_list:
             args = (self._perzone_prefix, TEST_ZONE_NAME_STR, name)
             args = (self._perzone_prefix, TEST_ZONE_NAME_STR, name)
-            if name.find('time_to_') == 0:
+            if name.find('latest_') == 0 and name.endswith('_duration'):
                 self.counters.start_timer(*args)
                 self.counters.start_timer(*args)
                 self.counters.stop_timer(*args)
                 self.counters.stop_timer(*args)
                 self.assertGreaterEqual(self.counters.get(*args), 0.0)
                 self.assertGreaterEqual(self.counters.get(*args), 0.0)
@@ -278,7 +278,7 @@ class BaseTestCounters():
         # setting all counters to zero
         # setting all counters to zero
         for name in self.counters._zones_item_list:
         for name in self.counters._zones_item_list:
             args = (self._perzone_prefix, TEST_ZONE_NAME_STR, name)
             args = (self._perzone_prefix, TEST_ZONE_NAME_STR, name)
-            if name.find('time_to_') == 0:
+            if name.find('latest_') == 0 and name.endswith('_duration'):
                 zero = 0.0
                 zero = 0.0
             else:
             else:
                 zero = 0
                 zero = 0

+ 8 - 8
src/lib/python/isc/statistics/tests/testdata/test_spec3.spec

@@ -19,8 +19,8 @@
 	    "ixfrreqv6": 0,
 	    "ixfrreqv6": 0,
 	    "xfrsuccess": 0,
 	    "xfrsuccess": 0,
 	    "xfrfail": 0,
 	    "xfrfail": 0,
-	    "time_to_ixfr": 0.0,
-	    "time_to_axfr": 0.0
+	    "latest_ixfr_duration": 0.0,
+	    "latest_axfr_duration": 0.0
           }
           }
         },
         },
         "item_title": "Zone names",
         "item_title": "Zone names",
@@ -98,20 +98,20 @@
               "item_description": "Number of zone transfer requests failed"
               "item_description": "Number of zone transfer requests failed"
             },
             },
             {
             {
-              "item_name": "time_to_ixfr",
+              "item_name": "latest_ixfr_duration",
               "item_type": "real",
               "item_type": "real",
               "item_optional": false,
               "item_optional": false,
               "item_default": 0.0,
               "item_default": 0.0,
-              "item_title": "Time to IXFR",
-              "item_description": "Elapsed time in seconds to do the last IXFR"
+              "item_title": "Latest IXFR duration",
+              "item_description": "Duration of the latest IXFR"
             },
             },
             {
             {
-              "item_name": "time_to_axfr",
+              "item_name": "latest_axfr_duration",
               "item_type": "real",
               "item_type": "real",
               "item_optional": false,
               "item_optional": false,
               "item_default": 0.0,
               "item_default": 0.0,
-              "item_title": "Time to AXFR",
-              "item_description": "Elapsed time in seconds to do the last AXFR"
+              "item_title": "Latest AXFR duration",
+              "item_description": "Duration of the latest AXFR"
             }
             }
           ]
           ]
         }
         }

+ 12 - 12
tests/lettuce/features/xfrin_notify_handling.feature

@@ -63,8 +63,8 @@ Feature: Xfrin incoming notify handling
     Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
     Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
     Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
     Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
-    Then the statistics counter time_to_ixfr for the zone _SERVER_ should be 0.0
-    Then the statistics counter time_to_axfr for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
 
 
     When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
     When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
     Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
     Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
@@ -137,10 +137,10 @@ Feature: Xfrin incoming notify handling
     Then the statistics counter xfrsuccess for the zone example.org. should be 1
     Then the statistics counter xfrsuccess for the zone example.org. should be 1
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone example.org. should be 0
     Then the statistics counter xfrfail for the zone example.org. should be 0
-    Then the statistics counter time_to_ixfr for the zone _SERVER_ should be 0.0
-    Then the statistics counter time_to_ixfr for the zone example.org. should be 0.0
-    Then the statistics counter time_to_axfr for the zone _SERVER_ should be greater than 0.0
-    Then the statistics counter time_to_axfr for the zone example.org. should be greater than 0.0
+    Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_ixfr_duration for the zone example.org. should be 0.0
+    Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be greater than 0.0
+    Then the statistics counter latest_axfr_duration for the zone example.org. should be greater than 0.0
 
 
     #
     #
     # Test for Xfr request rejected
     # Test for Xfr request rejected
@@ -207,8 +207,8 @@ Feature: Xfrin incoming notify handling
     Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
     Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
     Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
     Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be 0
-    Then the statistics counter time_to_ixfr for the zone _SERVER_ should be 0.0
-    Then the statistics counter time_to_axfr for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
 
 
     #
     #
     # set transfer_acl rejection
     # set transfer_acl rejection
@@ -294,10 +294,10 @@ Feature: Xfrin incoming notify handling
     Then the statistics counter xfrsuccess for the zone example.org. should be 0
     Then the statistics counter xfrsuccess for the zone example.org. should be 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be greater than 0
     Then the statistics counter xfrfail for the zone _SERVER_ should be greater than 0
     Then the statistics counter xfrfail for the zone example.org. should be greater than 0
     Then the statistics counter xfrfail for the zone example.org. should be greater than 0
-    Then the statistics counter time_to_ixfr for the zone _SERVER_ should be 0.0
-    Then the statistics counter time_to_ixfr for the zone example.org. should be 0.0
-    Then the statistics counter time_to_axfr for the zone _SERVER_ should be 0.0
-    Then the statistics counter time_to_axfr for the zone example.org. should be 0.0
+    Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_ixfr_duration for the zone example.org. should be 0.0
+    Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
+    Then the statistics counter latest_axfr_duration for the zone example.org. should be 0.0
 
 
     #
     #
     # Test for unreachable slave
     # Test for unreachable slave