diff --git a/ircd/hash.c b/ircd/hash.c index 249642be..0929ed4d 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -597,13 +597,6 @@ output_hash(struct Client *source_p, const char *name, int length, int *counts, "B :Average depth: %s Highest depth: %lu", buf, deepest); } - - for(i = 0; i < 11; i++) - { - sendto_one_numeric(source_p, RPL_STATSDEBUG, - "B :Nodes with %d entries: %d", - i, counts[i]); - } } diff --git a/ircd/irc_dictionary.c b/ircd/irc_dictionary.c index 5be9d479..6e86128c 100644 --- a/ircd/irc_dictionary.c +++ b/ircd/irc_dictionary.c @@ -823,11 +823,11 @@ void irc_dictionary_stats(struct Dictionary *dict, void (*cb)(const char *line, { maxdepth = 0; sum = stats_recurse(dict->root, 0, &maxdepth); - rb_snprintf(str, sizeof str, "%s: Objects: %d, Depth sum: %d, Avg depth: %d, Max depth: %d.", dict->id, dict->count, sum, sum / dict->count, maxdepth); + snprintf(str, sizeof str, "%-30s %-15s %-10d %-10d %-10d %-10d", dict->id, "DICT", dict->count, sum, sum / dict->count, maxdepth); } else { - rb_snprintf(str, sizeof str, "%s: Objects: 0, Depth sum: 0, Avg depth: 0, Max depth: 0.", dict->id); + snprintf(str, sizeof str, "%-30s %-15s %-10s %-10s %-10s %-10s", dict->id, "DICT", "0", "0", "0", "0"); } cb(str, privdata); diff --git a/ircd/irc_radixtree.c b/ircd/irc_radixtree.c index ace9ad61..01e3eb09 100644 --- a/ircd/irc_radixtree.c +++ b/ircd/irc_radixtree.c @@ -1036,11 +1036,11 @@ irc_radixtree_stats(struct irc_radixtree *dict, void (*cb)(const char *line, voi if (dict->count > 0) { sum = stats_recurse(dict->root, 0, &maxdepth); - snprintf(str, sizeof str, "%s: Objects: %d, Depth sum: %d, Avg depth: %d, Max depth: %d.", dict->id, dict->count, sum, sum / dict->count, maxdepth); + snprintf(str, sizeof str, "%-30s %-15s %-10d %-10d %-10d %-10d", dict->id, "RADIX", dict->count, sum, sum / dict->count, maxdepth); } else { - snprintf(str, sizeof str, "%s: Objects: 0, Depth sum: 0, Avg depth: 0, Max depth: 0.", dict->id); + snprintf(str, sizeof str, "%-30s %-15s %-10s %-10s %-10s %-10s", dict->id, "RADIX", "0", "0", "0", "0"); } cb(str, privdata); diff --git a/modules/m_stats.c b/modules/m_stats.c index ce0f14d7..ba524a62 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -281,12 +281,10 @@ stats_hash_cb(const char *buf, void *client_p) static void stats_hash(struct Client *source_p) { - hash_stats(source_p); + sendto_one_numeric(source_p, RPL_STATSDEBUG, "B :%-30s %-15s %-10s %-10s %-10s %-10s", + "NAME", "TYPE", "OBJECTS", "DEPTH SUM", "AVG DEPTH", "MAX DEPTH"); - sendto_one_numeric(source_p, RPL_STATSDEBUG, "B :Dictionary stats:"); irc_dictionary_stats_walk(stats_hash_cb, source_p); - - sendto_one_numeric(source_p, RPL_STATSDEBUG, "B :Radix tree stats:"); irc_radixtree_stats_walk(stats_hash_cb, source_p); }