]> granicus.if.org Git - pdns/commitdiff
add little comment to guard against overly simple fix for slow qsize-q metric
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 11 Apr 2014 07:19:37 +0000 (09:19 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 11 Apr 2014 07:19:37 +0000 (09:19 +0200)
pdns/common_startup.cc

index aadc6d568e1de5852e636e9105ca2aa5e3df3478..ffa1cce6b0826c4bde78286468636fab60a82eaa 100644 (file)
@@ -268,10 +268,10 @@ void *qthread(void *number)
       numreceived++;
 
     if(number==0) { // only run on main thread
-      if(!((maintcount++)%250)) { // maintenance tasks
+      if(!((maintcount++)%250)) { // maintenance tasks - this can conceivably run infrequently
         S.set("latency",(int)avg_latency);
         int qcount, acount;
-        distributor->getQueueSizes(qcount, acount);
+        distributor->getQueueSizes(qcount, acount);  // this does locking and other things, so don't get smart
         S.set("qsize-q",qcount);
       }
     }