# ProvidesMemorySamples

> Contract for panels that feed the Profiling timeline memory graph.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › [panels](/docs/extensions/debug/reference/panels/index.md) › ProvidesMemorySamples

| interface | `yii\debug\panels\ProvidesMemorySamples` |
| --- | --- |
| Source | [`src/panels/ProvidesMemorySamples.php`](https://github.com/yii2-extensions/debug/blob/main/src/panels/ProvidesMemorySamples.php#L15) |

Implemented by 2 types:

- [`LogPanel`](/docs/extensions/debug/reference/panels/logpanel/index.md)
- [`ProfilingPanel`](/docs/extensions/debug/reference/panels/profilingpanel/index.md)

Contract for panels that feed the Profiling timeline memory graph.

[`ProfilingPanel`](/docs/extensions/debug/reference/panels/profilingpanel/index.md) plots its own samples and appends those of the panel registered under the `log` id when that
panel implements this interface, so a replacement Log panel keeps contributing readings to the graph.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`getMemorySamples()`](#method-getMemorySamples) abstract | Returns the memory readings this panel contributes to the Timeline graph. | `ProvidesMemorySamples` |

## Method details

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

```php
abstract public function getMemorySamples(): list<PHPForge\Debug\Panel\MemorySample>
```

Returns the memory readings this panel contributes to the Timeline graph.

**Returns**

`list<PHPForge\Debug\Panel\MemorySample>`: Samples in capture order.