struct linhash_item *itemp;
unsigned num_epi_files, num_epis, num_unique_tags, num_x = 0;
long unsigned num_tags = 0;
- char *xdir, *lh_stats;
+ char *xdir;
struct regfile_iter *riter;
- bool verbose = OPT_GIVEN(STATS, VERBOSE);
tagtab = hash_tags(&num_epi_files, &num_epis);
for (
num_tags += (long unsigned)itemp->object;
num_unique_tags = linhash_num_items(tagtab);
linhash_iterator_free(liter);
- if (verbose)
- lh_stats = linhash_statistics(tagtab);
- linhash_free(tagtab);
-
xdir = get_xdir();
for (
regfile_iter_new(xdir, &riter);
(float)num_tags / num_epis : 0);
printf("average number of tag recurrence... %8.02f\n", num_unique_tags > 0?
(float)num_tags / num_unique_tags : 0);
- if (verbose) {
+ if (OPT_GIVEN(STATS, VERBOSE)) {
+ char *lh_stats = linhash_statistics(tagtab);
printf("\nlinear hashing statistics:\n%s\n", lh_stats);
free(lh_stats);
}
+ linhash_free(tagtab);
return 1;
}
EXPORT_CMD_HANDLER(stats);