Skip to content
PHP Ecosystem
Explore

TimelineMemoryRenderer

API reference › Debug Core › Panel › Timeline › TimelineMemoryRenderer

final classPHPForge\Debug\Panel\Timeline\TimelineMemoryRenderer
Sourcesrc/Panel/Timeline/TimelineMemoryRenderer.php

Renders profiler memory samples as the shared inline timeline SVG.

MethodDescriptionDefined by
render() staticRenders an SVG memory graph, or '' when its geometry cannot be resolved.TimelineMemoryRenderer
public static function render(list<PHPForge\Debug\Panel\MemorySample> $samples, float $start, float $duration, int $memory, int $width = 1920, int $height = 40): string

Renders an SVG memory graph, or '' when its geometry cannot be resolved.

Parameters

ParameterTypeDescription
$sampleslist<PHPForge\Debug\Panel\MemorySample>Memory samples in any order.
$startfloatRequest start time the horizontal axis is offset from.
$durationfloatRequest duration the horizontal axis spans, in seconds.
$memoryintPeak memory the vertical axis scales to, in bytes.
$widthintViewport width, in user units.
$heightintViewport height, in user units.

Returns

string: Inline SVG markup, or an empty string when the geometry cannot be resolved.