]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] stats counter for priming queries
authorEvan Hunt <each@isc.org>
Fri, 27 Oct 2017 04:38:43 +0000 (21:38 -0700)
committerEvan Hunt <each@isc.org>
Fri, 27 Oct 2017 04:38:43 +0000 (21:38 -0700)
4795. [func] A new statistics counter has been added to track
priming queries. [RT #46313]

CHANGES
bin/named/statschannel.c
bin/tests/system/statistics/tests.sh
doc/arm/notes.xml
lib/dns/include/dns/stats.h
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 67331ad73c86a66183c98efe819931b0f2fee6ca..b922bb3bbae447a1e45facb939755b5a11273d06 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4795.  [func]          A new statistics counter has been added to track
+                       priming queries. [RT #46313]
+
 4794.  [func]          "dnssec-checkds -s" specifies a file from which
                        to read a DS set rather than querying the parent.
                        [RT #44667]
index b9370f875aef6024cf88a66ca372c018054b5eb6..cc8cde80aa43417c1432c187ea784ff7f588f4e5 100644 (file)
@@ -395,6 +395,7 @@ init_desc(void) {
        SET_RESSTATDESC(serverquota, "spilled due to server quota",
                        "ServerQuota");
        SET_RESSTATDESC(nextitem, "waited for next item", "NextItem");
+       SET_RESSTATDESC(priming, "priming queries", "Priming");
 
        INSIST(i == dns_resstatscounter_max);
 
@@ -1615,7 +1616,7 @@ generatexml(named_server_t *server, isc_uint32_t flags,
                        ISC_XMLCHAR "type=\"text/xsl\" href=\"/bind9.xsl\""));
        TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "statistics"));
        TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "version",
-                                        ISC_XMLCHAR "3.10"));
+                                        ISC_XMLCHAR "3.11"));
 
        /* Set common fields for statistics dump */
        dumparg.type = isc_statsformat_xml;
@@ -2411,7 +2412,7 @@ generatejson(named_server_t *server, size_t *msglen,
        /*
         * These statistics are included no matter which URL we use.
         */
-       obj = json_object_new_string("1.4");
+       obj = json_object_new_string("1.5");
        CHECKMEM(obj);
        json_object_object_add(bindstats, "json-stats-version", obj);
 
index c049c989ccfd302e71191fc0d19032820690b4db..a456882aee1f1896a1d54b8296f2660fb4ce36c3 100644 (file)
@@ -137,5 +137,12 @@ fi
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
+ret=0
+n=`expr $n + 1`
+echo "I:checking priming queries are counted ($n)"
+grep "1 priming queries" ns3/named.stats
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
 echo "I:exit status: $status"
 [ $status -eq 0 ] || exit 1
index d88018ae4ae0331cec1909c2c947ad4e9570c418..fe52b2d672f52c8d15152745906a7bf4ceeeaa01 100644 (file)
          queries. [RT #45847]
        </para>
       </listitem>
+      <listitem>
+       <para>
+         A new statistics counter has been added to track priming
+         queries. [RT #46313]
+       </para>
+      </listitem>
       <listitem>
        <para>
          The <command>dnssec-signzone -x</command> flag and the
index bcfa906e18a399c461ed827a1daf31085d8ccd30..f4b061dc76fb2a9294cadb6175236541e68d6fad 100644 (file)
@@ -64,7 +64,8 @@ enum {
        dns_resstatscounter_zonequota = 41,
        dns_resstatscounter_serverquota = 42,
        dns_resstatscounter_nextitem = 43,
-       dns_resstatscounter_max = 44,
+       dns_resstatscounter_priming = 44,
+       dns_resstatscounter_max = 45,
 
        /*
         * DNSSEC stats.
index a153817974b3b958f3a6497e14707184cce37b6a..cf71b054a431284cbe2d07820903aa7f4be73e13 100644 (file)
@@ -9987,6 +9987,7 @@ dns_resolver_prime(dns_resolver_t *res) {
                        res->priming = ISC_FALSE;
                        UNLOCK(&res->lock);
                }
+               inc_stats(res, dns_resstatscounter_priming);
        }
 }