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

# Class: NodeSystemMetricsCollector

Node.js system metrics collector

## Implements

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

## Table of contents

### Constructors

- [constructor](NodeSystemMetricsCollector#constructor)

### Methods

- [getMemoryUsage](NodeSystemMetricsCollector#getmemoryusage)
- [getCPUUsage](NodeSystemMetricsCollector#getcpuusage)
- [getNetworkStats](NodeSystemMetricsCollector#getnetworkstats)

## Constructors

### constructor

• **new NodeSystemMetricsCollector**(): [`NodeSystemMetricsCollector`](NodeSystemMetricsCollector)

#### Returns

[`NodeSystemMetricsCollector`](NodeSystemMetricsCollector)

#### Defined in

[packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts:10](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts#L10)

## Methods

### getMemoryUsage

▸ **getMemoryUsage**(): `Promise`\<`undefined` \| \{ `used`: `number` ; `free`: `number` ; `total`: `number` ; `heap`: \{ `used`: `number` ; `total`: `number` } }\>

#### Returns

`Promise`\<`undefined` \| \{ `used`: `number` ; `free`: `number` ; `total`: `number` ; `heap`: \{ `used`: `number` ; `total`: `number` } }\>

#### Implementation of

[SystemMetricsCollector](../interfaces/SystemMetricsCollector).[getMemoryUsage](../interfaces/SystemMetricsCollector#getmemoryusage)

#### Defined in

[packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts:14](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts#L14)

---

### getCPUUsage

▸ **getCPUUsage**(): `Promise`\<`undefined` \| \{ `user`: `number` ; `system`: `number` ; `percent`: `number` }\>

#### Returns

`Promise`\<`undefined` \| \{ `user`: `number` ; `system`: `number` ; `percent`: `number` }\>

#### Implementation of

[SystemMetricsCollector](../interfaces/SystemMetricsCollector).[getCPUUsage](../interfaces/SystemMetricsCollector#getcpuusage)

#### Defined in

[packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts:37](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts#L37)

---

### getNetworkStats

▸ **getNetworkStats**(): `Promise`\<`undefined` \| \{ `requests`: `number` ; `bytesReceived`: `number` ; `bytesSent`: `number` ; `latency`: `number` }\>

#### Returns

`Promise`\<`undefined` \| \{ `requests`: `number` ; `bytesReceived`: `number` ; `bytesSent`: `number` ; `latency`: `number` }\>

#### Implementation of

[SystemMetricsCollector](../interfaces/SystemMetricsCollector).[getNetworkStats](../interfaces/SystemMetricsCollector#getnetworkstats)

#### Defined in

[packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts:56](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/performance/collectors/system-metrics-collector.ts#L56)
