TimelineMemoryRenderer
API reference › Debug Core › Panel › Timeline › TimelineMemoryRenderer
Renders profiler memory samples as the shared inline timeline SVG.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
render() static | Renders an SVG memory graph, or '' when its geometry cannot be resolved. | TimelineMemoryRenderer |
Method details
Section titled “Method details”render()
Section titled “render() ”public static function render(list<PHPForge\Debug\Panel\MemorySample> $samples, float $start, float $duration, int $memory, int $width = 1920, int $height = 40): stringRenders an SVG memory graph, or '' when its geometry cannot be resolved.
Parameters
| Parameter | Type | Description |
|---|---|---|
$samples | list<PHPForge\> | Memory samples in any order. |
$start | float | Request start time the horizontal axis is offset from. |
$duration | float | Request duration the horizontal axis spans, in seconds. |
$memory | int | Peak memory the vertical axis scales to, in bytes. |
$width | int | Viewport width, in user units. |
$height | int | Viewport height, in user units. |
Returns
string: Inline SVG markup, or an empty string when the geometry cannot be resolved.