" -w min -- Show only the worst case scenario.\n"
"\n"
" Supported btree types:\n"
-" "
+" all "
));
for (i = 0, m = maps; i < ARRAY_SIZE(maps); i++, m++)
printf("%s ", m->tag);
static int
construct_records_per_block(
- char *tag,
+ const char *tag,
int blocksize,
unsigned int *records_per_block)
{
static void
report(
- char *tag,
+ const char *tag,
unsigned int report_what,
unsigned long long nr_records,
unsigned int blocksize)
}
}
+static void
+report_all(
+ unsigned int report_what,
+ unsigned long long nr_records,
+ unsigned int blocksize)
+{
+ struct btmap *m;
+ int i;
+
+ for (i = 0, m = maps; i < ARRAY_SIZE(maps); i++, m++)
+ report(m->tag, report_what, nr_records, blocksize);
+}
+
static int
btheight_f(
int argc,
return 0;
}
+ for (i = optind; i < argc; i++) {
+ if (!strcmp(argv[i], "all")) {
+ report_all(report_what, nr_records, blocksize);
+ return 0;
+ }
+ }
+
for (i = optind; i < argc; i++)
report(argv[i], report_what, nr_records, blocksize);