]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
remove packet cache scanning functions from rec_control get-all - too much overhead!
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 18 Mar 2014 20:06:30 +0000 (21:06 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 18 Mar 2014 20:06:30 +0000 (21:06 +0100)
pdns/rec_channel_rec.cc
pdns/recursor_cache.cc

index d31bde3cb2b293499a740c1aa526198d1eabadd9..e4bc361ccac3abd53702d69a68658cb2003db62e 100644 (file)
@@ -69,7 +69,9 @@ map<string,string> getAllStatsMap()
   BOOST_FOREACH(the64bits, d_get64bitpointers) {
     ret.insert(make_pair(the64bits.first, lexical_cast<string>(*the64bits.second)));
   }
-  BOOST_FOREACH(the32bitmembers, d_get32bitmembers) {
+  BOOST_FOREACH(the32bitmembers, d_get32bitmembers) { 
+    if(the32bitmembers.first == "cache-bytes" || the32bitmembers.first=="packetcache-bytes")
+      continue; // too slow for 'get-all'
     ret.insert(make_pair(the32bitmembers.first, lexical_cast<string>(the32bitmembers.second())));
   }
   return ret;
index 5844df6a120a04e262abbfe9c7b816ddbdfdc0d1..53030baa79c1a25a5803480738fd0a74f08d6c5f 100644 (file)
@@ -91,6 +91,7 @@ unsigned int MemRecursorCache::size()
   return (unsigned int)d_cache.size();
 }
 
+// this function is too slow to poll!
 unsigned int MemRecursorCache::bytes()
 {
   unsigned int ret=0;