# HistoryScale

> Typed capture-wide maxima for the History grid's micro-gauges.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [View](/docs/extensions/debug-core/reference/view/index.md) › [History](/docs/extensions/debug-core/reference/view/history/index.md) › HistoryScale

| final readonly class | `PHPForge\Debug\View\History\HistoryScale` |
| --- | --- |
| Source | [`src/View/History/HistoryScale.php`](https://github.com/php-forge/debug-core/blob/main/src/View/History/HistoryScale.php#L12) |

Typed capture-wide maxima for the History grid's micro-gauges.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-maxPeakMemory"></span>`$maxPeakMemory` readonly constructor | `int` | Largest captured peak memory on the page, in bytes; `0` when no row carries one. | `HistoryScale` |
| <span id="property-maxProcessingTime"></span>`$maxProcessingTime` readonly constructor | `float` | Largest captured processing time on the page, in seconds; `0.0` when no row carries one. | `HistoryScale` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates maxima for the History grid gauges. | `HistoryScale` |
| [`fromModels()`](#method-fromModels) static | Scans the visible rows (ignoring rows without a captured value) and returns the page maxima. | `HistoryScale` |

## Method details

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

```php
public function __construct(float $maxProcessingTime, int $maxPeakMemory)
```

Creates maxima for the History grid gauges.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$maxProcessingTime` | `float` |  |
| `$maxPeakMemory` | `int` |  |

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

```php
public static function fromModels(list<PHPForge\Debug\View\History\HistoryRow> $models): self
```

Scans the visible rows (ignoring rows without a captured value) and returns the page maxima.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$models` | `list<`[`HistoryRow`](/docs/extensions/debug-core/reference/view/history/historyrow/index.md)`>` | Rows as supplied by the data provider. |

**Returns**

`self`