btrees

package
v0.0.0-...-d5f1c63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKeyComparer

func DefaultKeyComparer(a, b []byte) int

DefaultKeyComparer provides default byte-wise key comparison

func NewBTreeAnalyzer

func NewBTreeAnalyzer(navigator interfaces.BTreeNavigator, traverser interfaces.BTreeTraverser, btreeInfo interfaces.BTreeInfoReader) interfaces.BTreeAnalyzer

NewBTreeAnalyzer creates a new BTreeAnalyzer implementation

func NewBTreeNavigator

func NewBTreeNavigator(blockReader interfaces.BlockDeviceReader, rootOID types.OidT, btreeInfo interfaces.BTreeInfoReader) interfaces.BTreeNavigator

NewBTreeNavigator creates a new BTreeNavigator implementation

func NewBTreeSearcher

func NewBTreeSearcher(navigator interfaces.BTreeNavigator, btreeInfo interfaces.BTreeInfoReader, keyComparer KeyComparer) interfaces.BTreeSearcher

NewBTreeSearcher creates a new BTreeSearcher implementation

func NewBTreeTraverser

func NewBTreeTraverser(navigator interfaces.BTreeNavigator) interfaces.BTreeTraverser

NewBTreeTraverser creates a new BTreeTraverser implementation

Types

type KeyComparer

type KeyComparer func(a, b []byte) int

KeyComparer defines a function type for comparing keys

type KeyDistributionAnalysis

type KeyDistributionAnalysis struct {
	TotalKeys         uint64
	LeafKeys          uint64
	InternalKeys      uint64
	MinKeysPerNode    uint32
	MaxKeysPerNode    uint32
	AvgKeysPerNode    float64
	AvgKeysPerLeaf    float64
	LeafNodeCount     int
	InternalNodeCount int
}

KeyDistributionAnalysis contains analysis of key distribution

type StorageEfficiencyAnalysis

type StorageEfficiencyAnalysis struct {
	TotalCapacity   uint64
	UsedSpace       uint64
	WastedSpace     uint64
	Utilization     float64
	WastePercentage float64
	NodeCount       int
	AvgNodeSize     float64
}

StorageEfficiencyAnalysis contains analysis of storage efficiency

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL