Changeset 610

Show
Ignore:
Timestamp:
03/21/06 23:53:35 (7 years ago)
Author:
ahu
Message:

oops, did cache-entries accounting wrong. made 'average latency' ignore outliers - cheating a bit. silence a harmless warning

Location:
trunk/pdns/pdns
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/pdns_recursor.cc

    r609 r610  
    355355 
    356356    uint64_t newLat=(uint64_t)(spent*1000000); 
    357     g_stats.avgLatencyUsec=(1-0.0001)*g_stats.avgLatencyUsec + 0.0001*newLat; 
     357    if(newLat < 1000000)  // outliers of several minutes exist.. 
     358      g_stats.avgLatencyUsec=(uint64_t)((1-0.0001)*g_stats.avgLatencyUsec + 0.0001*newLat); 
    358359    delete dc; 
    359360  } 
  • trunk/pdns/pdns/recursor_cache.cc

    r592 r610  
    6161  unsigned int ret=0; 
    6262  for(cache_t::const_iterator i=d_cache.begin(); i!=d_cache.end(); ++i) { 
    63     ret+=i->d_name.size(); 
     63    ret+=i->d_records.size(); 
    6464  } 
    6565  return ret;