Commit 30973087 authored by Evan Hunt's avatar Evan Hunt

[master] add prefetch stat counter

4720.	[func]		Added a statistics counter to track prefetch
			queries. [RT #45847]
parent 34130ee2
4720. [func] Added a statistics counter to track prefetch
queries. [RT #45847]
4719. [bug] Address PVS static analyzer warnings. [RT #45946]
4718. [func] Avoid seaching for a owner name compression pointer
......
......@@ -9,7 +9,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="html" indent="yes" version="4.0"/>
<xsl:template match="statistics[@version=&quot;3.9&quot;]">
<xsl:template match="statistics[@version=&quot;3.10&quot;]">
<html>
<head>
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
......
......@@ -14,7 +14,7 @@ static char xslmsg[] =
"\n"
"<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
" <xsl:output method=\"html\" indent=\"yes\" version=\"4.0\"/>\n"
" <xsl:template match=\"statistics[@version=&quot;3.9&quot;]\">\n"
" <xsl:template match=\"statistics[@version=&quot;3.10&quot;]\">\n"
" <html>\n"
" <head>\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
......
......@@ -301,6 +301,7 @@ init_desc(void) {
SET_NSSTATDESC(usedstale,
"successful uses of stale cache data after lookup failure",
"QryUsedStale");
SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch");
INSIST(i == ns_statscounter_max);
/* Initialize resolver statistics */
......@@ -1548,7 +1549,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.9"));
ISC_XMLCHAR "3.10"));
/* Set common fields for statistics dump */
dumparg.type = isc_statsformat_xml;
......@@ -2309,7 +2310,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.3");
obj = json_object_new_string("1.4");
CHECKMEM(obj);
json_object_object_add(bindstats, "json-stats-version", obj);
......
......@@ -476,6 +476,12 @@
matching <command>cookie-secret</command>.
</para>
</listitem>
<listitem>
<para>
A new statistics counter has been added to track prefetch
queries. [RT #45847]
</para>
</listitem>
</itemizedlist>
</section>
......
......@@ -96,7 +96,9 @@ enum {
ns_statscounter_trystale = 61,
ns_statscounter_usedstale = 62,
ns_statscounter_max = 63
ns_statscounter_prefetch = 63,
ns_statscounter_max = 64
};
void
......
......@@ -2473,6 +2473,8 @@ query_prefetch(ns_client_t *client, dns_name_t *qname,
ns_client_detach(&dummy);
}
dns_rdataset_clearprefetch(rdataset);
ns_stats_increment(client->sctx->nsstats,
ns_statscounter_prefetch);
}
static inline void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment