ACCESS_EVENT
ACCESS_EVENT = 'event'
Access churn recorded as a compact login event.
The default. 48 bytes per event, 24% cheaper than a full field delta, and it keeps the security trail a rollback should never erase.
The shape of a site and the policy applied to it, as an estimate's input.
Two kinds of thing, deliberately in one object because an estimate is meaningless without both. The shape - users, nodes, rows, files - decides how much churn there is. The policy - flush interval, base interval, retention, whether files are captured at all - decides what that churn costs. A site twice the size on half the interval is not twice the bill.
Per-realm daily operation counts can be supplied directly. Left empty they are derived from the shape using the recorded per-subject rates, which is what the estimate form does. A calibration pass instead counts what the site actually wrote in the last day and passes those, which turns a projection into a back-test.
__construct(int $users = 0, int $nodes = 0, int $rows = 0, int $files = 0, int $fileBytes = 0, float $activeShare = 0.1, int $segmentInterval = 15, int $baseInterval = 14400, int $retentionDays = 365, int $deploysPerYear = 150, string $accessChurn = \self::ACCESS_EVENT, bool $captureFiles = false, array$opsPerDay = []) : mixed
Constructs a measurement.
| int | $users | Registered users. |
| int | $nodes | Content items. |
| int | $rows | Rows in tables the site's own modules write, which are subjects like any other. |
| int | $files | Managed and unmanaged files. |
| int | $fileBytes | Total bytes those files occupy. |
| float | $activeShare | Share of users active on a given day, which is what generates access churn. |
| int | $segmentInterval | Seconds between flushes, which is the durability window and the request-cost dial. |
| int | $baseInterval | Seconds between base anchors. |
| int | $retentionDays | How long the coarsest retention level keeps history. |
| int | $deploysPerYear | Deploys, which is how often the code realm changes. |
| string | $accessChurn | One of the access modes. |
| bool | $captureFiles | Whether the file realm is captured, which is the single largest switch in the model. |
| array |
$opsPerDay | Realm value keyed to operations a day, overriding what the shape would imply. Empty to derive them. |
When a count is negative, an interval is not positive, or the access mode is unknown.
with(array$changes) : \Drupal\strata\Estimate\Measurement
The same measurement with one field replaced.
What a capacity search and a what-if column both need: an estimate is run many times over one shape with one dial moved, and a value object that cannot be varied would force the caller to repeat every other field.
| array |
$changes | Field name keyed to its new value. |
The new measurement.