\Drupal\strata\Explore ExplorerReport

What the store holds, and what deleting one thing would cost.

The three reachability classes are reported separately rather than as one total, because they answer different questions. Frames held by a commit go when that commit goes; frames held by a dictionary or by a delta chain are held by something a reader did not ask about and would be surprised to lose.

complete is the field that decides whether the rest can be trusted. A reachability walk over a store whose commit chain is broken cannot enumerate everything that is reachable, so anything it calls collectable might in fact be needed. A prune refuses in that state, and so does this report: the collectable figure is reported as unknown rather than as zero.

Summary

Methods
Properties
Constants
__construct
ratio
collectableCount
wasteShare
summary
jsonSerialize
frames
rawBytes
storedBytes
commits
dictionaries
reachable
collectable
collectableBytes
complete
byRealm
seconds
No public constants found
No protected methods found
No protected properties found
No protected constants found
bytes
No private properties found
No private constants found

Properties

$frames

$frames : int

Type

int

$rawBytes

$rawBytes : int

Type

int

$storedBytes

$storedBytes : int

Type

int

$commits

$commits : int

Type

int

$dictionaries

$dictionaries : int

Type

int

$reachable

$reachable : array

Type

array<string|int, mixed>

$collectable

$collectable : array

Type

array<string|int, mixed>

$collectableBytes

$collectableBytes : int

Type

int

$complete

$complete : bool

Type

bool

$byRealm

$byRealm : array

Type

array<string|int, mixed>

$seconds

$seconds : float

Type

float

Methods

__construct()

__construct(int  $frames = 0, int  $rawBytes = 0, int  $storedBytes = 0, int  $commits = 0, int  $dictionaries = 0, array  $reachable = [], list  $collectable = [], int  $collectableBytes = 0, bool  $complete = true, array  $byRealm = [], float  $seconds = 0.0) : mixed

Constructs a report.

Parameters

int $frames

Frames the index holds.

int $rawBytes

Decoded bytes those frames represent.

int $storedBytes

Bytes actually written.

int $commits

Commits the index holds.

int $dictionaries

Dictionaries the store holds.

array $reachable

How many frames each reachability class holds.

list $collectable

Frame addresses nothing reachable references.

int $collectableBytes

Bytes those frames occupy.

bool $complete

Whether the reachability walk finished.

array $byRealm

Stored bytes per realm, as far as the commit index can attribute them.

float $seconds

How long the walk took.

Returns

mixed —

ratio()

ratio() : float

The compression ratio across the whole store.

Returns

float —

Raw over stored, or 1.0 when nothing is stored.

collectableCount()

collectableCount() : int|null

How many frames could be collected.

Returns

int|null —

The count, or NULL when the walk did not finish and the answer is unknown.

wasteShare()

wasteShare() : float

The share of stored bytes nothing needs.

Returns

float —

Between 0.0 and 1.0, or 0.0 when the answer is unknown.

summary()

summary() : string

A one-line summary.

Returns

string —

What the store holds.

jsonSerialize()

jsonSerialize() : array

{@inheritdoc}

Returns

array —

bytes()

bytes(int  $bytes) : string

Renders a byte count in the largest unit that stays readable.

Parameters

int $bytes

The count.

Returns

string —

The rendered size.