# ProfileCellRenderer

> Renders the typed cells of the profile grid for the Profiling debug panel.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Profile](/docs/extensions/debug-core/reference/panel/profile/index.md) › ProfileCellRenderer

| final class | `PHPForge\Debug\Panel\Profile\ProfileCellRenderer` |
| --- | --- |
| Source | [`src/Panel/Profile/ProfileCellRenderer.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/Profile/ProfileCellRenderer.php#L20) |

Renders the typed cells of the profile grid for the Profiling debug panel.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`renderCategoryCell()`](#method-renderCategoryCell) static | Renders the category as the shared [`Fqcn::renderLabel()`](/docs/extensions/debug-core/reference/helper/fqcn/index.md#method-renderLabel) two-tone label: muted namespace prefix plus a bold `Class::method` pair, with the full category preserved in the `title` attribute. | `ProfileCellRenderer` |
| [`renderDurationCell()`](#method-renderDurationCell) static | Renders the block duration formatted as `N.N ms`, with a micro-gauge rail scaled against the capture maximum when one exists. | `ProfileCellRenderer` |
| [`renderInfoCell()`](#method-renderInfoCell) static | Renders the info cell with one indentation arrow per nesting level, followed by the info text. | `ProfileCellRenderer` |
| [`renderTimeCell()`](#method-renderTimeCell) static | Renders the capture time as `H:i:s.mmm` with a full `Y-m-d H:i:s.mmm` hover tooltip, derived from the row's millisecond timestamp. | `ProfileCellRenderer` |

## Method details

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

```php
public static function renderCategoryCell(PHPForge\Debug\Panel\Profile\ProfileRow $row): string
```

Renders the category as the shared [`Fqcn::renderLabel()`](/docs/extensions/debug-core/reference/helper/fqcn/index.md#method-renderLabel) two-tone label: muted namespace prefix plus a
bold `Class::method` pair, with the full category preserved in the `title` attribute.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$row` | [`ProfileRow`](/docs/extensions/debug-core/reference/panel/profile/profilerow/index.md) |  |

**Returns**

`string`

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

```php
public static function renderDurationCell(PHPForge\Debug\Panel\Profile\ProfileRow $row, float $maxDuration): string
```

Renders the block duration formatted as `N.N ms`, with a micro-gauge rail scaled against the capture maximum when
one exists.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$row` | [`ProfileRow`](/docs/extensions/debug-core/reference/panel/profile/profilerow/index.md) | Typed profile row. |
| `$maxDuration` | `float` | Capture maximum in milliseconds ([`ProfileRow::maxDuration()`](/docs/extensions/debug-core/reference/panel/profile/profilerow/index.md#method-maxDuration)). |

**Returns**

`string`

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

```php
public static function renderInfoCell(PHPForge\Debug\Panel\Profile\ProfileRow $row): string
```

Renders the info cell with one indentation arrow per nesting level, followed by the info text.

DB command blocks, and any block whose info [`SqlHighlighter::isStatement()`](/docs/extensions/debug-core/reference/panel/db/sqlhighlighter/index.md#method-isStatement) reads as raw SQL, render
through [`SqlHighlighter::highlight()`](/docs/extensions/debug-core/reference/panel/db/sqlhighlighter/index.md#method-highlight) with the same token spans as the db panel queries grid. Long
statements collapse behind the [`CellMore`](/docs/extensions/debug-core/reference/helper/cellmore/index.md) clamp instead of stretching the row past the viewport.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$row` | [`ProfileRow`](/docs/extensions/debug-core/reference/panel/profile/profilerow/index.md) | Typed profile row. |

**Returns**

`string`

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

```php
public static function renderTimeCell(PHPForge\Debug\Panel\Profile\ProfileRow $row): string
```

Renders the capture time as `H:i:s.mmm` with a full `Y-m-d H:i:s.mmm` hover tooltip, derived from the row's
millisecond timestamp.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$row` | [`ProfileRow`](/docs/extensions/debug-core/reference/panel/profile/profilerow/index.md) |  |

**Returns**

`string`