Skip to content

RunStatistics ​

Rasuvaeff\PropertyTesting\Runner\RunStatistics

Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2

Counters of a random phase, carried by the results whose reporting needs them: the classification distribution and the excessive-discard warning are printed by the adapter (the engine never formats framework output), so the result hands over the raw numbers.

Constructor ​

php
__construct(
    int $attempts,
    int $discards,
    int $checks,
    array<array-key,int> $classifications,
    array<array-key,float> $requirements = [],
    int $skips = 0,
    array<string,array<array-key,int>> $tables = [],
    array<string,array<string,int>> $intersections = [],
    ?int $domainSize = NULL,
    ?string $exhaustiveDeclined = NULL,
    ?\Runner\SearchReport $search = NULL,
)
ParameterTypeDefaultDescription
$attemptsintrequiredBodies executed in the random phase, discarded ones included.
$discardsintrequiredRuns discarded via Assume::that() — the input left the domain.
$checksintrequiredSuccessful (non-discarded, non-failing) runs completed.
$classificationsarray<array-key,int>requiredPer-label counts from Classify over the passing runs. Keyed by label — as array-key rather than string because PHP stores a numeric label such as '42' under an integer key, and a type that denied it would be a lie the readers of this array pay for.
$requirementsarray<array-key,float>[]Minimum percentages Classify::cover() registered, by label — carried alongside the counts they are compared against, including at the exits that never reached the assessment, so a report can say what was demanded as well as what happened.
$skipsint0Runs the environment refused (a missing dependency, a skipped lifecycle hook). Counted apart from the discards because they say nothing about the generators, and a report that folded them in would advise narrowing generators that are not at fault.
$tablesarray<string,array<array-key,int>>[]Per-table, per-tag counts from Classify::tabulate() over the passing runs; array-key for the reason $classifications gives.
$intersectionsarray<string,array<string,int>>[]Per table, how many passing runs hit each pair of its tags together, keyed tagA & tagB with the two tags in sorted order.
$domainSize?intNULLThe size of the parameter domain the phase enumerated instead of sampling (Runner\PropertyConfig::$exhaustive); null when it sampled.
$exhaustiveDeclined?stringNULLWhy an exhaustive run sampled after all — a parameter without a finite domain, or a domain above the budget; null when it enumerated or was never asked to.
$search?\Runner\SearchReportNULLWhat the targeted search amounted to; null when the property targeted nothing.