Skip to content
PHP Ecosystem
Explore

Gauge

API reference › Debug Core › Helper › Gauge

final classPHPForge\Debug\Helper\Gauge
Sourcesrc/Helper/Gauge.php

Renders the inline micro-gauge rail behind numeric readouts (History Duration/Memory, Profiling Duration).

MethodDescriptionDefined by
render() staticWraps a formatted readout in a micro-gauge scaled to current / max, clamped to 0%..100%.Gauge
public static function render(string $value, float $current, float $max): string

Wraps a formatted readout in a micro-gauge scaled to current / max, clamped to 0%..100%.

Parameters

ParameterTypeDescription
$valuestringPre-formatted readout text (for example 125 ms).
$currentfloatRow value in the same unit as $max.
$maxfloatCapture maximum the rail is scaled against.

Returns

string: Gauge markup or the original value when no scale is available.