public abstract class PageStats extends BaseIndexStats
Modifier and Type | Field and Description |
---|---|
long |
blobs
The #of allocations that are larger than the maximum slot size in
SLOT_SIZES . |
long[] |
histogram
Histogram of the allocation slot sizes based on
SLOT_SIZES . |
long |
leafBytes
The #of bytes in the raw records for the leaves visited.
|
long |
maxLeafBytes
The min/max bytes per leaf.
|
long |
maxNodeBytes
The min/max bytes per node.
|
long |
minLeafBytes
The min/max bytes per leaf.
|
long |
minNodeBytes
The min/max bytes per node.
|
long |
nerrors
The #of errors encountered during traversal.
|
long |
nodeBytes
The #of bytes in the raw records for the nodes visited.
|
long |
nrawRecs
The number of raw record allocations and the byte size of those raw
record allocations.
|
long |
nvisited
Number of nodes/leaves visited so far.
|
long |
rawRecBytes
The number of raw record allocations and the byte size of those raw
record allocations.
|
static int[] |
SLOT_SIZES
This map is used to report the histogram of pages based on the actual
byte count of the user data in the allocation when the backing slot size
is not directly available.
|
Constructor and Description |
---|
PageStats() |
Modifier and Type | Method and Description |
---|---|
long |
getBytesPerLeaf()
The average bytes per leaf.
|
long |
getBytesPerNode()
The average bytes per node.
|
long |
getBytesPerRawRecord()
The average bytes per raw record.
|
String |
getDataRow()
Return a row of data for an index as aggregated by this
PageStats
object. |
String |
getHeaderRow()
Return the header row for a table.
|
abstract int |
getRecommendedBranchingFactor()
This computes the recommended branching factor for the index based on an
examination of the current branching factor, an assumed nominal page size
of 8k, the min, max, and average node and leaf sizes, and the histogram
of the allocation sizes for the index.
|
long |
getTotalBytes()
|
String |
toString() |
protected void |
trackSlotSize(long allocationSize)
Track the histogram of allocation sizes.
|
void |
visit(ISimpleTreeIndexAccess ndx,
IAbstractNodeData node)
Visit a node or leaf, updating the
PageStats . |
writeOn
public long nvisited
public long nodeBytes
public long leafBytes
public long minNodeBytes
public long maxNodeBytes
public long minLeafBytes
public long maxLeafBytes
public final long[] histogram
SLOT_SIZES
. The
indices into this array are correlated with the indices into the
SLOT_SIZES
array. If the allocation is larger than the maximum
value in SLOT_SIZES
, then it is recorded in blobs
instead.public long blobs
SLOT_SIZES
.public long nerrors
public static final int[] SLOT_SIZES
public long nrawRecs
public long rawRecBytes
protected void trackSlotSize(long allocationSize)
allocationSize
- The size of some allocation.histogram
,
blobs
,
SLOT_SIZES
public long getTotalBytes()
public long getBytesPerNode()
public long getBytesPerLeaf()
public long getBytesPerRawRecord()
public String getHeaderRow()
getHeaderRow
in class BaseIndexStats
public String getDataRow()
PageStats
object.getDataRow
in class BaseIndexStats
getHeaderRow()
public abstract int getRecommendedBranchingFactor()
public void visit(ISimpleTreeIndexAccess ndx, IAbstractNodeData node)
PageStats
.
Note: This method MUST be extended to capture at least the initialization
of the BaseIndexStats.ntuples
, BaseIndexStats.nnodes
, BaseIndexStats.nleaves
, and
BaseIndexStats.m
fields.
ndx
- The index.node
- A node or leaf in that index.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.