]> jfr.im git - solanum.git/blobdiff - ircd/hash.c
make build reproducible
[solanum.git] / ircd / hash.c
index 88694911e528dd6ec6848d0740a6ec23ce7935ec..7658536dd7de67e5e6927dd44c1e0b187f1d7989 100644 (file)
@@ -534,66 +534,3 @@ find_cli_connid_hash(uint32_t connid)
 
        return NULL;
 }
-
-static void
-output_hash(struct Client *source_p, const char *name, int length, int *counts, unsigned long deepest)
-{
-       unsigned long total = 0;
-       int i;
-       char buf[128];
-
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,
-                       "B :%s Hash Statistics", name);
-
-       snprintf(buf, sizeof buf, "%.3f%%",
-                       (float) ((counts[0]*100) / (float) length));
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,
-                       "B :Size: %d Empty: %d (%s)",
-                       length, counts[0], buf);
-
-       for(i = 1; i < 11; i++)
-       {
-               total += (counts[i] * i);
-       }
-
-       /* dont want to divide by 0! --fl */
-       if(counts[0] != length)
-       {
-               snprintf(buf, sizeof buf, "%.3f/%.3f",
-                               (float) (total / (length - counts[0])),
-                               (float) (total / length));
-               sendto_one_numeric(source_p, RPL_STATSDEBUG,
-                               "B :Average depth: %s Highest depth: %lu",
-                               buf, deepest);
-       }
-}
-
-
-static void
-count_hash(struct Client *source_p, rb_dlink_list *table, int length, const char *name)
-{
-       int counts[11];
-       unsigned long deepest = 0;
-       int i;
-
-       memset(counts, 0, sizeof(counts));
-
-       for(i = 0; i < length; i++)
-       {
-               if(rb_dlink_list_length(&table[i]) >= 10)
-                       counts[10]++;
-               else
-                       counts[rb_dlink_list_length(&table[i])]++;
-
-               if(rb_dlink_list_length(&table[i]) > deepest)
-                       deepest = rb_dlink_list_length(&table[i]);
-       }
-
-       output_hash(source_p, name, length, counts, deepest);
-}
-
-void
-hash_stats(struct Client *source_p)
-{
-       count_hash(source_p, hostTable, HOST_MAX, "Hostname");
-}