mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
- Also display ECS module memory stats in stats_shm
git-svn-id: file:///svn/unbound/trunk@4107 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8fedcffc02
commit
a8bfa02af1
@ -238,6 +238,9 @@ static void print_mem(struct shm_stat_info* shm_stat)
|
||||
PR_LL("mem.cache.message", shm_stat->mem.msg);
|
||||
PR_LL("mem.cache.iterator", shm_stat->mem.iter);
|
||||
PR_LL("mem.cache.validator", shm_stat->mem.val);
|
||||
#ifdef CLIENT_SUBNET
|
||||
PR_LL("mem.cache.subnet", shm_stat->mem.subnet);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** print histogram */
|
||||
|
@ -262,6 +262,13 @@ void shm_main_run(struct worker *worker)
|
||||
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
|
||||
shm_stat->mem.iter = (*worker->env.mesh->mods.mod[modstack]->get_mem)(&worker->env, modstack);
|
||||
}
|
||||
#ifdef CLIENT_SUBNET
|
||||
modstack = modstack_find(&worker->env.mesh->mods, "subnet");
|
||||
if(modstack != -1) {
|
||||
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
|
||||
shm_stat->mem.subnet = (*worker->env.mesh->mods.mod[modstack]->get_mem)(&worker->env, modstack);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
server_stats_add(stat_total, stat_info);
|
||||
|
@ -61,6 +61,9 @@ struct shm_stat_info {
|
||||
size_t rrset;
|
||||
size_t val;
|
||||
size_t iter;
|
||||
#ifdef CLIENT_SUBNET
|
||||
size_t subnet;
|
||||
#endif
|
||||
} mem;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user