LabelShare
Rasuvaeff\PropertyTesting\Runner\LabelShare
Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
How often one Classify label occurred, together with the Classify::cover() threshold it was registered with, if any.
The share is over the property's successful checks, never its attempts: a discarded run produced no input the label could describe, so counting it in the denominator would report a smaller share for the same generator merely because Assume::that() rejected more inputs.
Constructor
__construct(
string $label,
int $count,
float $percent,
?float $required = NULL,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$label | string | required | The label as the property body recorded it. |
$count | int | required | Successful checks that recorded it (once per run, however often it was called). |
$percent | float | required | That count as a percentage of the successful checks; 0.0 when there were none. |
$required | ?float | NULL | The percentage Classify::cover() demanded, or null when the label was only classified. A required label the runs never reached still appears, with a count of zero — that is the case worth seeing. |
Methods
meetsRequirement()
meetsRequirement(): boolWhether the recorded share reaches the requirement. True for a label without one — there is nothing to miss.
This is arithmetic, not a verdict: whether the engine enforced it is Runner\DistributionReport::$coverageAssessed, because a run that gave up or ran out of budget never reached the assessment.