#define LOG(x) if(d_lm == Log) { L <<Logger::Warning << x; } else if(d_lm == Store) { d_trace << x; }
-bool SyncRes::s_noEDNSPing;
bool SyncRes::s_noEDNS;
- void accountAuthLatency(int usec)
+ void accountAuthLatency(int usec, int family)
{
- if(usec < 1000)
- g_stats.authAnswers0_1++;
- else if(usec < 10000)
- g_stats.authAnswers1_10++;
- else if(usec < 100000)
- g_stats.authAnswers10_100++;
- else if(usec < 1000000)
- g_stats.authAnswers100_1000++;
- else
- g_stats.authAnswersSlow++;
+ if(family == AF_INET) {
+ if(usec < 1000)
+ g_stats.auth4Answers0_1++;
+ else if(usec < 10000)
+ g_stats.auth4Answers1_10++;
+ else if(usec < 100000)
+ g_stats.auth4Answers10_100++;
+ else if(usec < 1000000)
+ g_stats.auth4Answers100_1000++;
+ else
+ g_stats.auth4AnswersSlow++;
+ } else {
+ if(usec < 1000)
+ g_stats.auth6Answers0_1++;
+ else if(usec < 10000)
+ g_stats.auth6Answers1_10++;
+ else if(usec < 100000)
+ g_stats.auth6Answers10_100++;
+ else if(usec < 1000000)
+ g_stats.auth6Answers100_1000++;
+ else
+ g_stats.auth6AnswersSlow++;
+ }
+
}
SyncRes::SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_unreachables(0),