map<DNSName, unsigned int> counts;
unsigned int total=0;
{
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->respLock);
if(!labels) {
for(const auto& a : shard->respRing) {
cutoff.tv_sec -= seconds;
StatNode root;
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->respLock);
for(const auto& c : shard->respRing) {
typedef std::unordered_map<string,string> entry_t;
vector<pair<unsigned int, entry_t > > ret;
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->respLock);
entry_t e;
counts.reserve(g_rings.getNumberOfResponseEntries());
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->respLock);
for(const auto& c : shard->respRing) {
counts.reserve(g_rings.getNumberOfQueryEntries());
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->queryLock);
for(const auto& c : shard->queryRing) {
if(seconds && c.when < cutoff)
map<ComboAddress, unsigned int,ComboAddress::addressOnlyLessThan > counts;
unsigned int total=0;
{
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->queryLock);
for(const auto& c : shard->queryRing) {
counts[c.requestor]++;
map<DNSName, unsigned int> counts;
unsigned int total=0;
if(!labels) {
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->queryLock);
for(const auto& a : shard->queryRing) {
counts[a.name]++;
}
else {
unsigned int lab = *labels;
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->queryLock);
for(auto a : shard->queryRing) {
a.name.trimToLabels(lab);
size_t totalEntries = 0;
std::vector<boost::circular_buffer<Rings::Response>> rings;
rings.reserve(g_rings.getNumberOfShards());
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
{
std::lock_guard<std::mutex> rl(shard->respLock);
rings.push_back(shard->respRing);
std::vector<Rings::Response> rr;
qr.reserve(g_rings.getNumberOfQueryEntries());
rr.reserve(g_rings.getNumberOfResponseEntries());
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
{
std::lock_guard<std::mutex> rl(shard->queryLock);
for (const auto& entry : shard->queryRing) {
double totlat=0;
unsigned int size=0;
{
- for (auto& shard : g_rings.d_shards) {
+ for (const auto& shard : g_rings.d_shards) {
std::lock_guard<std::mutex> rl(shard->respLock);
for(const auto& r : shard->respRing) {
/* skip actively discovered timeouts */
size_t Rings::numDistinctRequestors()
{
std::set<ComboAddress, ComboAddress::addressOnlyLessThan> s;
- for (auto& shard : d_shards) {
+ for (const auto& shard : d_shards) {
std::lock_guard<std::mutex> rl(shard->queryLock);
for(const auto& q : shard->queryRing) {
s.insert(q.requestor);
{
map<ComboAddress, unsigned int, ComboAddress::addressOnlyLessThan> counts;
uint64_t total=0;
- for (auto& shard : d_shards) {
+ for (const auto& shard : d_shards) {
{
std::lock_guard<std::mutex> rl(shard->queryLock);
for(const auto& q : shard->queryRing) {