BIND 10 trac2136, updated. 5f228ec5c5ece6555fe75815df78d78dd69d43a8 [2136] Update comment text

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Aug 8 05:54:04 UTC 2012


The branch, trac2136 has been updated
       via  5f228ec5c5ece6555fe75815df78d78dd69d43a8 (commit)
       via  f5a1df44489a75c4d708a5ec6217e512b2f803ce (commit)
       via  6ebdb1ea7d09467ccece71d9486c70490ce46fc7 (commit)
       via  1f2f3ffa10fe5065f64137c21f54f5e747d041f1 (commit)
       via  7ee55b5bff4f09e43c50e72eaace12adf49326ae (commit)
      from  2a0dd303927d9405b35b7e440f39335fb08b9093 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f228ec5c5ece6555fe75815df78d78dd69d43a8
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Aug 8 11:02:03 2012 +0530

    [2136] Update comment text

commit f5a1df44489a75c4d708a5ec6217e512b2f803ce
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Aug 8 11:01:53 2012 +0530

    [2136] Minor whitespace update

commit 6ebdb1ea7d09467ccece71d9486c70490ce46fc7
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Aug 8 10:36:30 2012 +0530

    [2136] Remove redundant tests

commit 1f2f3ffa10fe5065f64137c21f54f5e747d041f1
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Aug 8 10:32:06 2012 +0530

    [2136] Indent code

commit 7ee55b5bff4f09e43c50e72eaace12adf49326ae
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Aug 8 10:28:45 2012 +0530

    [2136] Assign and use intval earlier

-----------------------------------------------------------------------

Summary of changes:
 src/bin/stats/stats.py.in             |   15 +++++++--------
 src/bin/stats/tests/b10-stats_test.py |   11 +++++------
 2 files changed, 12 insertions(+), 14 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/stats.py.in b/src/bin/stats/stats.py.in
index a712748..43f9cb7 100755
--- a/src/bin/stats/stats.py.in
+++ b/src/bin/stats/stats.py.in
@@ -269,8 +269,8 @@ class Stats:
             while self.running:
                 _check_command()
                 now = get_timestamp()
-                if self.get_interval() > 0 and now >= self.next_polltime:
-                    intval = self.get_interval()
+                intval = self.get_interval()
+                if intval > 0 and now >= self.next_polltime:
                     # decide the next polling timestamp
                     self.next_polltime += intval
                     # adjust next time
@@ -491,12 +491,11 @@ class Stats:
         """
         handle show command
         """
-        # decide if polling should be done by the the last time of
-        # polling. If more than one seconds past since the last
-        # request to each module, the stats module requests each
-        # module statistics data and then shows the latest
-        # result. Otherwise, the stats module just shows statistics
-        # data which it has.
+        # decide if polling should be done based on the the last time of
+        # polling. If more than one second has passed since the last
+        # request to each module, the stats module requests each module
+        # statistics data and then shows the latest result. Otherwise,
+        # the stats module just shows statistics data which it has.
         if get_timestamp() - self._lasttime_poll > 1.0:
             self.do_polling()
         if owner or name:
diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py
index a965f5f..45ef3d1 100644
--- a/src/bin/stats/tests/b10-stats_test.py
+++ b/src/bin/stats/tests/b10-stats_test.py
@@ -375,9 +375,11 @@ class TestStats(unittest.TestCase):
         list_auth = [ self.base.auth.server,
                       self.base.auth2.server ]
         sum_qtcp = 0
-        for a in list_auth: sum_qtcp += a.queries_tcp
+        for a in list_auth:
+            sum_qtcp += a.queries_tcp
         sum_qudp = 0
-        for a in list_auth: sum_qudp += a.queries_udp
+        for a in list_auth:
+            sum_qudp += a.queries_udp
         self.stats.update_statistics_data('Auth', "bar1 at foo",
                                           {'queries.tcp':bar1_tcp})
         self.assertTrue('Auth' in self.stats.statistics_data)
@@ -387,8 +389,6 @@ class TestStats(unittest.TestCase):
         self.assertTrue('Auth' in self.stats.statistics_data_bymid)
         self.assertTrue('bar1 at foo' in self.stats.statistics_data_bymid['Auth'])
         self.assertTrue('queries.tcp' in self.stats.statistics_data_bymid['Auth']['bar1 at foo'])
-        self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar1 at foo']['queries.tcp'],
-                         bar1_tcp)
         self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar1 at foo'],
                          {'queries.tcp': bar1_tcp})
         # check consolidation of statistics data even if there is
@@ -402,7 +402,6 @@ class TestStats(unittest.TestCase):
         self.assertTrue('Auth' in self.stats.statistics_data_bymid)
         self.assertTrue('bar1 at foo' in self.stats.statistics_data_bymid['Auth'])
         self.assertTrue('queries.tcp' in self.stats.statistics_data_bymid['Auth']['bar1 at foo'])
-        self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar1 at foo']['queries.tcp'], bar1_tcp)
         self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar1 at foo'],
                          {'queries.tcp': bar1_tcp})
         self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar2 at foo'],
@@ -531,7 +530,7 @@ class TestStats(unittest.TestCase):
                                          ]}}))
         self.assertEqual(self.stats.command_show(owner='Auth', name='queries.udp'),
                          isc.config.create_answer(
-                0, {'Auth': {'queries.udp':sum_qudp}}))
+                0, {'Auth': {'queries.udp': sum_qudp}}))
         self.assertEqual(self.stats.command_show(owner='Auth', name='queries.perzone'),
                          isc.config.create_answer(
                 0, {'Auth': {'queries.perzone': [{ 'zonename': 'test1.example',



More information about the bind10-changes mailing list