TimelineSnapshot
API reference › Debug Core › Panel › Timeline › TimelineSnapshot
Canonical timing and peak-memory snapshot for the Timeline panel.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$end readonly constructor | float | The end time of the timeline snapshot. | TimelineSnapshot |
$memory readonly constructor | int | The peak memory usage at the time of the snapshot. | TimelineSnapshot |
$start readonly constructor | float | The start time of the timeline snapshot. | TimelineSnapshot |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the timing and peak-memory snapshot for the request. | TimelineSnapshot |
fromArray() static | Hydrates the Timeline panel snapshot from decoded JSON data. | TimelineSnapshot |
jsonSerialize() | Returns the snapshot for JSON serialization. | TimelineSnapshot |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(float $start, float $end, int $memory)Creates the timing and peak-memory snapshot for the request.
Parameters
| Parameter | Type | Description |
|---|---|---|
$start | float | The start time of the timeline snapshot. |
$end | float | The end time of the timeline snapshot. |
$memory | int | The peak memory usage at the time of the snapshot. |
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfHydrates the Timeline panel snapshot from decoded JSON data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Decoded Timeline panel payload. |
$path | string | Payload path used in hydration errors. |
Returns
self: Hydrated timing and peak-memory snapshot.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the snapshot for JSON serialization.
Returns
array<string, mixed>: Serialized start time, end time, and peak memory.