<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / MemoryPerformanceStorage

# Class: MemoryPerformanceStorage

Performance storage interface

## Implements

- [`PerformanceStorage`](../interfaces/PerformanceStorage)

## Table of contents

### Constructors

- [constructor](MemoryPerformanceStorage#constructor)

### Methods

- [save](MemoryPerformanceStorage#save)
- [getMetrics](MemoryPerformanceStorage#getmetrics)
- [getAggregatedStats](MemoryPerformanceStorage#getaggregatedstats)
- [clear](MemoryPerformanceStorage#clear)
- [flush](MemoryPerformanceStorage#flush)
- [close](MemoryPerformanceStorage#close)

## Constructors

### constructor

• **new MemoryPerformanceStorage**(`maxEntries?`): [`MemoryPerformanceStorage`](MemoryPerformanceStorage)

#### Parameters

| Name         | Type     | Default value |
| :----------- | :------- | :------------ |
| `maxEntries` | `number` | `5000`        |

#### Returns

[`MemoryPerformanceStorage`](MemoryPerformanceStorage)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:7](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L7)

## Methods

### save

▸ **save**(`entry`): `Promise`\<`void`\>

#### Parameters

| Name    | Type                                                     |
| :------ | :------------------------------------------------------- |
| `entry` | [`PerformanceMetrics`](../interfaces/PerformanceMetrics) |

#### Returns

`Promise`\<`void`\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[save](../interfaces/PerformanceStorage#save)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:11](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L11)

---

### getMetrics

▸ **getMetrics**(`operation?`, `timeRange?`): `Promise`\<[`PerformanceMetrics`](../interfaces/PerformanceMetrics)[]\>

#### Parameters

| Name              | Type     |
| :---------------- | :------- |
| `operation?`      | `string` |
| `timeRange?`      | `Object` |
| `timeRange.start` | `Date`   |
| `timeRange.end`   | `Date`   |

#### Returns

`Promise`\<[`PerformanceMetrics`](../interfaces/PerformanceMetrics)[]\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[getMetrics](../interfaces/PerformanceStorage#getmetrics)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:18](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L18)

---

### getAggregatedStats

▸ **getAggregatedStats**(`timeRange?`): `Promise`\<[`AggregatedPerformanceStats`](../interfaces/AggregatedPerformanceStats)\>

#### Parameters

| Name              | Type     |
| :---------------- | :------- |
| `timeRange?`      | `Object` |
| `timeRange.start` | `Date`   |
| `timeRange.end`   | `Date`   |

#### Returns

`Promise`\<[`AggregatedPerformanceStats`](../interfaces/AggregatedPerformanceStats)\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[getAggregatedStats](../interfaces/PerformanceStorage#getaggregatedstats)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:31](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L31)

---

### clear

▸ **clear**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[clear](../interfaces/PerformanceStorage#clear)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:71](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L71)

---

### flush

▸ **flush**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[flush](../interfaces/PerformanceStorage#flush)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:75](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L75)

---

### close

▸ **close**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Implementation of

[PerformanceStorage](../interfaces/PerformanceStorage).[close](../interfaces/PerformanceStorage#close)

#### Defined in

[packages/agents/src/plugins/performance/storages/memory-storage.ts:79](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/storages/memory-storage.ts#L79)
