BIND 10 stats201209-auth-merge, updated. ac94e8c641d5076744e99ca8bebb2524f6488b81 [stats201209-auth-merge] rename statistics functions in AuthSrv

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Aug 16 10:03:32 UTC 2012


The branch, stats201209-auth-merge has been updated
       via  ac94e8c641d5076744e99ca8bebb2524f6488b81 (commit)
      from  00a035d825e6a3f71955a78afec99c25517f3147 (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 ac94e8c641d5076744e99ca8bebb2524f6488b81
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Thu Aug 16 19:00:24 2012 +0900

    [stats201209-auth-merge] rename statistics functions in AuthSrv
    
    rename AuthSrv::get() and AuthSrv::dump() to AuthSrv::getStatistics()
    and AuthSrv::dumpStatistics()

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

Summary of changes:
 src/bin/auth/auth_srv.cc                |    4 ++--
 src/bin/auth/auth_srv.h                 |    5 +++--
 src/bin/auth/command.cc                 |    2 +-
 src/bin/auth/tests/auth_srv_unittest.cc |   24 ++++++++++++------------
 4 files changed, 18 insertions(+), 17 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 55a1d84..b59906f 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -855,12 +855,12 @@ AuthSrv::updateConfig(ConstElementPtr new_config) {
 }
 
 const Counters::item_tree_type
-AuthSrv::get(const Counters::item_node_name_set_type& trees) const {
+AuthSrv::getStatistics(const Counters::item_node_name_set_type& trees) const {
     return (impl_->counters_.get(trees));
 }
 
 const Counters::item_tree_type
-AuthSrv::dump() const {
+AuthSrv::dumpStatistics() const {
     return (impl_->counters_.dump());
 }
 
diff --git a/src/bin/auth/auth_srv.h b/src/bin/auth/auth_srv.h
index 24139b4..36d3131 100644
--- a/src/bin/auth/auth_srv.h
+++ b/src/bin/auth/auth_srv.h
@@ -208,7 +208,7 @@ public:
     /// \throw bad_alloc
     ///
     /// \return a tree of statistics items.
-    const isc::auth::statistics::Counters::item_tree_type get(
+    const isc::auth::statistics::Counters::item_tree_type getStatistics(
         const isc::auth::statistics::Counters::item_node_name_set_type &items)
         const;
 
@@ -219,7 +219,8 @@ public:
     /// \throw bad_alloc
     ///
     /// \return a tree of statistics items.
-    const isc::auth::statistics::Counters::item_tree_type dump() const;
+    const isc::auth::statistics::Counters::item_tree_type dumpStatistics()
+        const;
 
     /**
      * \brief Set and get the addresses we listen on.
diff --git a/src/bin/auth/command.cc b/src/bin/auth/command.cc
index b1fc034..ac2a326 100644
--- a/src/bin/auth/command.cc
+++ b/src/bin/auth/command.cc
@@ -139,7 +139,7 @@ public:
         LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_RECEIVED_GETSTATS);
         statistics::Counters::item_node_name_set_type trees;
         trees.insert("auth.server.qr");
-        return (createAnswer(0, server.get(trees)));
+        return (createAnswer(0, server.getStatistics(trees)));
     }
 };
 
diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc
index 5f954a4..8f95dcd 100644
--- a/src/bin/auth/tests/auth_srv_unittest.cc
+++ b/src/bin/auth/tests/auth_srv_unittest.cc
@@ -134,7 +134,7 @@ protected:
     // Checks whether all Rcode counters are set to zero
     void checkAllRcodeCountersZero() const {
         std::map<std::string, ConstElementPtr> stats_map;
-        server.dump()->getValue(stats_map);
+        server.dumpStatistics()->getValue(stats_map);
 
         const std::string rcode_prefix("auth.server.qr.rcode.");
         for (std::map<std::string, ConstElementPtr>::const_iterator
@@ -160,7 +160,7 @@ protected:
         }
 
         std::map<std::string, ConstElementPtr> stats_map;
-        server.dump()->getValue(stats_map);
+        server.dumpStatistics()->getValue(stats_map);
 
         const std::string rcode_prefix("auth.server.qr.rcode.");
         for (std::map<std::string, ConstElementPtr>::const_iterator
@@ -188,7 +188,7 @@ protected:
         }
 
         std::map<std::string, ConstElementPtr> stats_map;
-        server.dump()->getValue(stats_map);
+        server.dumpStatistics()->getValue(stats_map);
 
         const std::string opcode_prefix("auth.server.qr.opcode.");
         for (std::map<std::string, ConstElementPtr>::const_iterator
@@ -461,7 +461,7 @@ TEST_F(AuthSrvTest, TSIGCheckFirst) {
         "It should be unsigned with this error";
     // TSIG should have failed, and so the per opcode counter shouldn't be
     // incremented.
-    ConstElementPtr stats = server.dump();
+    ConstElementPtr stats = server.dumpStatistics();
     EXPECT_EQ(0, stats->get("auth.server.qr.opcode.other")->intValue());
 
     checkAllRcodeCountersZeroExcept(Rcode::NOTAUTH(), 1);
@@ -1088,7 +1088,7 @@ TEST_F(AuthSrvTest,
 // Submit UDP normal query and check query counter
 TEST_F(AuthSrvTest, queryCounterUDPNormal) {
     // The counter should be initialized to 0.
-    ConstElementPtr stats_init = server.dump();
+    ConstElementPtr stats_init = server.dumpStatistics();
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.opcode.query")->intValue());
@@ -1106,7 +1106,7 @@ TEST_F(AuthSrvTest, queryCounterUDPNormal) {
     //   request.tcp, opcode.query, qtype.ns, rcode.refused, response
     // and these counters should not be incremented:
     //   request.tcp
-    ConstElementPtr stats_after = server.dump();
+    ConstElementPtr stats_after = server.dumpStatistics();
     EXPECT_EQ(1, stats_after->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(0, stats_after->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.opcode.query")->intValue());
@@ -1118,7 +1118,7 @@ TEST_F(AuthSrvTest, queryCounterUDPNormal) {
 // Submit TCP normal query and check query counter
 TEST_F(AuthSrvTest, queryCounterTCPNormal) {
     // The counter should be initialized to 0.
-    ConstElementPtr stats_init = server.dump();
+    ConstElementPtr stats_init = server.dumpStatistics();
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.opcode.query")->intValue());
@@ -1136,7 +1136,7 @@ TEST_F(AuthSrvTest, queryCounterTCPNormal) {
     //   request.tcp, opcode.query, qtype.ns, rcode.refused, response
     // and these counters should not be incremented:
     //   request.udp
-    ConstElementPtr stats_after = server.dump();
+    ConstElementPtr stats_after = server.dumpStatistics();
     EXPECT_EQ(0, stats_after->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.opcode.query")->intValue());
@@ -1148,7 +1148,7 @@ TEST_F(AuthSrvTest, queryCounterTCPNormal) {
 // Submit TCP AXFR query and check query counter
 TEST_F(AuthSrvTest, queryCounterTCPAXFR) {
     // The counter should be initialized to 0.
-    ConstElementPtr stats_init = server.dump();
+    ConstElementPtr stats_init = server.dumpStatistics();
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.opcode.query")->intValue());
@@ -1167,7 +1167,7 @@ TEST_F(AuthSrvTest, queryCounterTCPAXFR) {
     //   request.tcp, opcode.query, qtype.axfr
     // and these counters should not be incremented:
     //   request.udp, response
-    ConstElementPtr stats_after = server.dump();
+    ConstElementPtr stats_after = server.dumpStatistics();
     EXPECT_EQ(0, stats_after->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.opcode.query")->intValue());
@@ -1178,7 +1178,7 @@ TEST_F(AuthSrvTest, queryCounterTCPAXFR) {
 // Submit TCP IXFR query and check query counter
 TEST_F(AuthSrvTest, queryCounterTCPIXFR) {
     // The counter should be initialized to 0.
-    ConstElementPtr stats_init = server.dump();
+    ConstElementPtr stats_init = server.dumpStatistics();
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(0, stats_init->get("auth.server.qr.opcode.query")->intValue());
@@ -1197,7 +1197,7 @@ TEST_F(AuthSrvTest, queryCounterTCPIXFR) {
     //   request.tcp, opcode.query, qtype.ixfr
     // and these counters should not be incremented:
     //   request.udp, response
-    ConstElementPtr stats_after = server.dump();
+    ConstElementPtr stats_after = server.dumpStatistics();
     EXPECT_EQ(0, stats_after->get("auth.server.qr.request.udp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.request.tcp")->intValue());
     EXPECT_EQ(1, stats_after->get("auth.server.qr.opcode.query")->intValue());



More information about the bind10-changes mailing list