xb5_structural_stats (xb5 v1.0.1)

View Source

Structural statistics about a B-tree.

This is primarily intended for debugging and testing.

Summary

Types

count_per_node()

-type count_per_node() :: [{node_type(), non_neg_integer()}, ...].

node_type()

-type node_type() :: internal4 | internal3 | internal2 | internal1 | leaf4 | leaf3 | leaf2 | leaf1.

percent_per_node()

-type percent_per_node() :: [{node_type(), number()}, ...].

stat()

-type stat() ::
          {height, non_neg_integer()} |
          {node_counts, count_per_node()} |
          {node_percentages, percent_per_node()} |
          {total_keys, non_neg_integer()} |
          {key_percentages, percent_per_node()} |
          {avg_keys_per_node, undefined | float()} |
          {avg_keys_per_internal_node, undefined | float()} |
          {avg_keys_per_leaf_node, undefined | float()}.

t()

-type t() :: [stat(), ...].