# Gauge

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

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Helper](/docs/extensions/debug-core/reference/helper/index.md) › Gauge

| final class | `PHPForge\Debug\Helper\Gauge` |
| --- | --- |
| Source | [`src/Helper/Gauge.php`](https://github.com/php-forge/debug-core/blob/main/src/Helper/Gauge.php#L16) |

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

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`render()`](#method-render) static | Wraps a formatted readout in a micro-gauge scaled to `current / max`, clamped to `0%`..`100%`. | `Gauge` |

## Method details

### render() <span id="method-render"></span>

```php
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**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `string` | Pre-formatted readout text (for example `125 ms`). |
| `$current` | `float` | Row value in the same unit as `$max`. |
| `$max` | `float` | Capture maximum the rail is scaled against. |

**Returns**

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