]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2252] rename the item name and update descriptions
authorNaoki Kambe <kambe@jprs.co.jp>
Mon, 11 Mar 2013 11:22:13 +0000 (20:22 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Tue, 12 Mar 2013 04:17:29 +0000 (13:17 +0900)
rename the item name "time_to_xxxx" to "latest_xxxx_duration", and
update descriptions of them. This is for addressing the reviewer's
comment.

src/bin/xfrin/b10-xfrin.xml
src/bin/xfrin/tests/xfrin_test.py
src/bin/xfrin/xfrin.py.in
src/bin/xfrin/xfrin.spec
src/lib/python/isc/statistics/counters.py
src/lib/python/isc/statistics/tests/counters_test.py
src/lib/python/isc/statistics/tests/testdata/test_spec3.spec
tests/lettuce/features/xfrin_notify_handling.feature

index b29cbbd928739417b09747cc90335edb1a8dc0d9..ccec3f6b2010ab1c04f541a6f2e8b9f749796290 100644 (file)
@@ -295,16 +295,16 @@ operation
                   </varlistentry>
 
                   <varlistentry>
-                    <term>time_to_ixfr</term>
+                    <term>latest_ixfr_duration</term>
                     <listitem><simpara>
-                      Elapsed time in second to do the last IXFR
+                      Duration of the latest IXFR
                     </simpara></listitem>
                   </varlistentry>
 
                   <varlistentry>
-                    <term>time_to_axfr</term>
+                    <term>latest_axfr_duration</term>
                     <listitem><simpara>
-                      Elapsed time in second to do the last AXFR
+                      Duration of the latest AXFR
                     </simpara></listitem>
                   </varlistentry>
 
index c149cc20b0cd75ec4593d43a3ea7cd65f1c62584..505aed7c38ab238cce76ded4062e6199621e6ae7 100644 (file)
@@ -1479,7 +1479,7 @@ class TestAXFR(TestXfrinConnection):
                           TEST_ZONE_NAME_STR, 'xfrsuccess')
         self.assertRaises(isc.cc.data.DataNotFoundError,
                           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.assertFalse(self.conn._datasrc_client._journaling_enabled)
 
@@ -1512,7 +1512,7 @@ class TestAXFR(TestXfrinConnection):
                                                  'xfrsuccess'))
         self.assertGreaterEqual(self.conn._counters.get('zones',
                                                         TEST_ZONE_NAME_STR,
-                                                        'time_to_axfr'),
+                                                        'latest_axfr_duration'),
                                 0.0)
 
     def test_do_xfrin_with_tsig(self):
index 39e81c590b196d2bbdbeeb4088254bac9f9ad5fb..d13c89f2a6d0f7bba359a42835bb4d16bb4221ba 100755 (executable)
@@ -955,7 +955,7 @@ class XfrinConnection(asyncore.dispatcher):
 
             # start statistics timer
             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())
             self._send_query(self._request_type)
             # count (A|X)IXFR requests for statistics
@@ -989,7 +989,7 @@ class XfrinConnection(asyncore.dispatcher):
                            )
             # stop statistics timer
             self._counters.stop_timer('zones', self._zone_name.to_text(),
-                                      'time_to_' + req_str.lower())
+                                      'latest_' + req_str.lower() + '_duration')
 
         except XfrinZoneUptodate:
             # Eventually we'll probably have to treat this case as a trigger
index 547f0723bb825a3e938a13fef5e7596a39faabc6..00c519b5a4e4c71a4b5d41679e772185f5f5f35f 100644 (file)
            "ixfrreqv6": 0,
            "xfrsuccess": 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_description": "Number of zone transfer requests failed"
             },
             {
-              "item_name": "time_to_ixfr",
+              "item_name": "latest_ixfr_duration",
               "item_type": "real",
               "item_optional": false,
               "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_optional": false,
               "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"
             }
           ]
         }
index 8138ab61725ced41498d094849c2801fdcf47e44..c8a14746c1cedd3531b6be276f703895203e0159 100644 (file)
@@ -217,8 +217,8 @@ class Counters():
         zones/example.com./ixfrreqv6
         zones/example.com./xfrsuccess
         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
         axfr_running
         socket/unixdomain/open
index 395a959a17bc573d5563f8d1384bc4e69aa52114..6616ec3c62ba5d87e96e57f7443f2a812355770a 100644 (file)
@@ -197,7 +197,7 @@ class BaseTestCounters():
         # for per-zone counters
         for name in self.counters._zones_item_list:
             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.stop_timer(*args)
                 self.assertGreaterEqual(self.counters.get(*args), 0.0)
@@ -278,7 +278,7 @@ class BaseTestCounters():
         # setting all counters to zero
         for name in self.counters._zones_item_list:
             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
             else:
                 zero = 0
index c97a09a5c246fd3c4f795e022392ef5ee92bca48..da01c4f7d3fc86a090a69928d295f857fe3906ee 100644 (file)
@@ -19,8 +19,8 @@
            "ixfrreqv6": 0,
            "xfrsuccess": 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_description": "Number of zone transfer requests failed"
             },
             {
-              "item_name": "time_to_ixfr",
+              "item_name": "latest_ixfr_duration",
               "item_type": "real",
               "item_optional": false,
               "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_optional": false,
               "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"
             }
           ]
         }
index 9d1ec12acf7e4f6ddc53d44f19de33cc5fec2c81..f16ad8b38d9ba80dc5c9f0b9f2171fd1113cd61a 100644 (file)
@@ -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 xfrsuccess 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
     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 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 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
@@ -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 xfrsuccess 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
@@ -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 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 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