<!--
 ⚠️  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) / PerformanceStorage

# Interface: PerformanceStorage

Performance storage interface

## Implemented by

- [`MemoryPerformanceStorage`](../classes/MemoryPerformanceStorage)

## Table of contents

### Methods

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

## Methods

### save

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

#### Parameters

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

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:119](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L119)

---

### getMetrics

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

#### Parameters

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

#### Returns

`Promise`\<[`PerformanceMetrics`](PerformanceMetrics)[]\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:120](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L120)

---

### getAggregatedStats

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

#### Parameters

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

#### Returns

`Promise`\<[`AggregatedPerformanceStats`](AggregatedPerformanceStats)\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:121](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L121)

---

### clear

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

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:122](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L122)

---

### flush

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

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:123](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L123)

---

### close

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

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/performance/types.ts:124](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/types.ts#L124)
