Changeset 1496
- Timestamp:
- 01/10/10 09:30:52 (2 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
rec_channel_rec.cc (modified) (5 diffs)
-
syncres.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/rec_channel_rec.cc
r1493 r1496 12 12 #include <boost/format.hpp> 13 13 #include <boost/algorithm/string.hpp> 14 #include <boost/foreach.hpp> 14 15 #include <sys/types.h> 15 16 #include <sys/stat.h> … … 56 57 } 57 58 59 string getAllStats() 60 { 61 string ret; 62 pair<string, const uint32_t*> the32bits; 63 pair<string, const uint64_t*> the64bits; 64 pair<string, function< uint32_t() > > the32bitmembers; 65 BOOST_FOREACH(the32bits, d_get32bitpointers) { 66 ret += the32bits.first + "\t" + lexical_cast<string>(*the32bits.second) + "\n"; 67 } 68 BOOST_FOREACH(the64bits, d_get64bitpointers) { 69 ret += the64bits.first + "\t" + lexical_cast<string>(*the64bits.second) + "\n"; 70 } 71 BOOST_FOREACH(the32bitmembers, d_get32bitmembers) { 72 ret += the32bitmembers.first + "\t" + lexical_cast<string>(the32bitmembers.second()) + "\n"; 73 } 74 return ret; 75 } 58 76 59 77 template<typename T> … … 156 174 } 157 175 158 159 #if 0 // broken!160 uint32_t getQueryRate()161 {162 struct timeval now;163 gettimeofday(&now, 0);164 optional<float> delay=g_stats.queryrate.get(now, 10);165 if(delay)166 return (uint32_t)(1000000/(*delay));167 else168 return 0;169 }170 #endif171 172 176 #ifndef WIN32 173 177 static uint64_t getSysTimeMsec() … … 365 369 addGetStat("dlg-only-drops", &SyncRes::s_nodelegated); 366 370 367 addGetStat("shunted-queries", &g_stats.shunted);368 addGetStat("noshunt-size", &g_stats.noShuntSize);369 addGetStat("noshunt-expired", &g_stats.noShuntExpired);370 addGetStat("noshunt-nomatch", &g_stats.noShuntNoMatch);371 addGetStat("noshunt-cname", &g_stats.noShuntCNAME);372 addGetStat("noshunt-wrong-question", &g_stats.noShuntWrongQuestion);373 addGetStat("noshunt-wrong-type", &g_stats.noShuntWrongType);374 375 371 addGetStat("negcache-entries", boost::bind(getNegCacheSize)); 376 372 addGetStat("throttle-entries", boost::bind(getThrottleSize)); … … 475 471 vector<string>::const_iterator begin=words.begin()+1, end=words.end(); 476 472 473 if(cmd=="get-all") 474 return getAllStats(); 475 477 476 if(cmd=="get") 478 477 return doGet(begin, end); 479 478 480 479 if(cmd=="get-parameter") 481 480 return doGetParameter(begin, end); -
trunk/pdns/pdns/syncres.hh
r1493 r1496 475 475 uint64_t chainResends; 476 476 uint64_t nsSetInvalidations; 477 uint64_t shunted;478 uint64_t noShuntCNAME, noShuntExpired, noShuntSize, noShuntNoMatch, noShuntWrongType, noShuntWrongQuestion;479 477 uint64_t ednsPingMatches; 480 478 uint64_t ednsPingMismatches;