--------------------- PatchSet 6475 Date: 2008/01/09 04:59:19 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Add ipcache counters to measure various DNS records retrieved from network Members: src/ipcache.cc:1.9.2.54->1.9.2.55 Index: squid3/src/ipcache.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ipcache.cc,v retrieving revision 1.9.2.54 retrieving revision 1.9.2.55 diff -u -r1.9.2.54 -r1.9.2.55 --- squid3/src/ipcache.cc 9 Jan 2008 04:02:50 -0000 1.9.2.54 +++ squid3/src/ipcache.cc 9 Jan 2008 04:59:19 -0000 1.9.2.55 @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.9.2.54 2008/01/09 04:02:50 amosjeffries Exp $ + * $Id: ipcache.cc,v 1.9.2.55 2008/01/09 04:59:19 amosjeffries Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -82,6 +82,9 @@ int misses; int negative_hits; int numeric_hits; + int rr_a; + int rr_aaaa; + int rr_cname; int cname_only; int invalid; } @@ -450,6 +453,7 @@ continue; } na++; + IpcacheStats.rr_aaaa++; continue; } #endif @@ -460,12 +464,14 @@ continue; } na++; + IpcacheStats.rr_a++; continue; } /* With A and AAAA, the CNAME does not necessarily come with additional records to use. */ if (answers[k].type == RFC1035_TYPE_CNAME) { cname_found=1; + IpcacheStats.rr_cname++; #if DNS_CNAME debugs(14, 5, "ipcacheParse: " << name << " CNAME " << answers[k].rdata << " (checking destination: " << i << ")."); @@ -834,6 +840,12 @@ IpcacheStats.numeric_hits); storeAppendPrintf(sentry, "IPcache Misses: %d\n", IpcacheStats.misses); + storeAppendPrintf(sentry, "IPcache Retrieved A: %d\n", + IpcacheStats.rr_a); + storeAppendPrintf(sentry, "IPcache Retrieved AAAA: %d\n", + IpcacheStats.rr_aaaa); + storeAppendPrintf(sentry, "IPcache Retrieved CNAME: %d\n", + IpcacheStats.rr_cname); storeAppendPrintf(sentry, "IPcache CNAME-Only Response: %d\n", IpcacheStats.cname_only); storeAppendPrintf(sentry, "IPcache Invalid Request: %d\n",