\Drupal\strata\Drill DrillReport

What one restore drill proved, and what it could not check.

The four counts are deliberately separate. A subject that MATCHED proves the store reproduces what the site holds. A subject that DIFFERED is a real failure. A subject that was SKIPPED could not be judged - it changed after the commit the drill replayed, so a difference there is the site being newer rather than the store being wrong. A subject that was UNREADABLE is a failure of a different kind: the store could not produce a value at all.

Collapsing skipped into either column is how a drill starts lying. Counted as a pass it inflates confidence; counted as a failure it makes every busy site look broken.

Summary

Methods
Properties
Constants
__construct
passed
wasRefused
judged
accuracy
verdict
summary
jsonSerialize
target
mode
matched
differed
skipped
unreadable
sampled
population
seconds
ranAt
refused
MATCHED
DIFFERED
SKIPPED
UNREADABLE
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Constant

MATCHED

MATCHED = 'matched'

The store reproduced what the site holds.

DIFFERED

DIFFERED = 'differed'

The store produced a value and it was not what the site holds.

SKIPPED

SKIPPED = 'skipped'

The subject moved on after the commit that was replayed, so nothing was proved either way.

UNREADABLE

UNREADABLE = 'unreadable'

The store could not produce a value.

Properties

$target

$target : string

Type

string

$mode

$mode : string

Type

string

$matched

$matched : array

Type

array<string|int, mixed>

$differed

$differed : array

Type

array<string|int, mixed>

$skipped

$skipped : array

Type

array<string|int, mixed>

$unreadable

$unreadable : array

Type

array<string|int, mixed>

$sampled

$sampled : int

Type

int

$population

$population : int

Type

int

$seconds

$seconds : float

Type

float

$ranAt

$ranAt : int

Type

int

$refused

$refused : ?string

Type

string|null

Methods

__construct()

__construct(string  $target, string  $mode = 'replay', array  $matched = [], array  $differed = [], array  $skipped = [], array  $unreadable = [], int  $sampled = 0, int  $population = 0, float  $seconds = 0.0, int  $ranAt = 0, string|null  $refused = null) : mixed

Constructs a report.

Parameters

string $target

Commit the drill replayed against.

string $mode

Either "replay" or "scratch".

array $matched

Subject path keyed to a note, for subjects that reproduced exactly.

array $differed

Subject path keyed to what differed.

array $skipped

Subject path keyed to why it could not be judged.

array $unreadable

Subject path keyed to why the store could not produce a value.

int $sampled

How many subjects were examined.

int $population

How many subjects the index holds, so a reader knows what share was checked.

float $seconds

How long the drill took.

int $ranAt

Unix seconds the drill ran.

string|null $refused

Why the drill did not run at all, when it did not.

Returns

mixed —

passed()

passed() : bool

Whether the drill proved the store reproduces the site.

A drill that could judge nothing is not a pass. An operator who read "0 differences" as a healthy backup when every subject was skipped would have measured nothing and been reassured by it.

Returns

bool —

TRUE when at least one subject was judged and none differed or was unreadable.

wasRefused()

wasRefused() : bool

Whether the drill ran at all.

Returns

bool —

TRUE when it was refused.

judged()

judged() : int

How many subjects the drill could actually judge.

Returns

int —

Matched plus differed plus unreadable.

accuracy()

accuracy() : float

The share of judged subjects that reproduced exactly.

Returns

float —

Between 0.0 and 1.0, or 0.0 when nothing could be judged.

verdict()

verdict() : string

The verdict, in one word.

Returns

string —

Either "pass", "fail", "inconclusive" or "refused".

summary()

summary() : string

A one-line summary.

Returns

string —

The verdict and the counts.

jsonSerialize()

jsonSerialize() : array

{@inheritdoc}

Returns

array —