# QueueSummary

> Typed aggregate view-model for the Queue panel detail view.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Queue](/docs/extensions/debug-core/reference/panel/queue/index.md) › QueueSummary

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

Typed aggregate view-model for the Queue panel detail view.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-records"></span>`$records` readonly constructor | `list<`[`JobRecord`](/docs/extensions/debug-core/reference/panel/queue/jobrecord/index.md)`>` | Captured events in chronological order. | `QueueSummary` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a Queue panel summary from captured events. | `QueueSummary` |
| [`componentIds()`](#method-componentIds) | Returns the distinct component ids surfaced across every captured event, in first-seen order. | `QueueSummary` |
| [`fromRecords()`](#method-fromRecords) static | Builds a queue summary from the captured job events. | `QueueSummary` |
| [`hasErrors()`](#method-hasErrors) | Returns whether at least one captured event reported a failure. | `QueueSummary` |
| [`isEmpty()`](#method-isEmpty) | Returns whether the summary carries no records. | `QueueSummary` |
| [`totalErrors()`](#method-totalErrors) | Returns the number of error events captured. | `QueueSummary` |
| [`totalEvents()`](#method-totalEvents) | Returns the total number of captured events across every lifecycle phase. | `QueueSummary` |
| [`totalExecuted()`](#method-totalExecuted) | Returns the number of successfully executed events. | `QueueSummary` |
| [`totalPushed()`](#method-totalPushed) | Returns the number of push events captured. | `QueueSummary` |

## Method details

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

```php
public function __construct(array $records)
```

Creates a Queue panel summary from captured events.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$records` | `array` |  |

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

```php
public function componentIds(): list<string>
```

Returns the distinct component ids surfaced across every captured event, in first-seen order.

**Returns**

`list<string>`: Component ids, deduplicated while preserving order.

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

```php
public static function fromRecords(list<PHPForge\Debug\Panel\Queue\JobRecord> $records): self
```

Builds a queue summary from the captured job events.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$records` | `list<`[`JobRecord`](/docs/extensions/debug-core/reference/panel/queue/jobrecord/index.md)`>` | Captured job events. |

**Returns**

`self`

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

```php
public function hasErrors(): bool
```

Returns whether at least one captured event reported a failure.

**Returns**

`bool`

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

```php
public function isEmpty(): bool
```

Returns whether the summary carries no records.

**Returns**

`bool`

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

```php
public function totalErrors(): int
```

Returns the number of error events captured.

**Returns**

`int`

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

```php
public function totalEvents(): int
```

Returns the total number of captured events across every lifecycle phase.

**Returns**

`int`

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

```php
public function totalExecuted(): int
```

Returns the number of successfully executed events.

**Returns**

`int`

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

```php
public function totalPushed(): int
```

Returns the number of push events captured.

**Returns**

`int`