> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# getCpuLoadStats()

> Returns current CPU load state and per-frame encoding/decoding statistics.

`getCpuLoadStats()`

✓ Prebuilt✓ Custom

Returns a snapshot of the current CPU load state and video encode/decode statistics. Stats in the `latest` field are updated approximately every two seconds — poll this method to monitor CPU performance over time.

> [!WARNING]
>
> Applies to video calls only.

## Return value

Returns a `Promise<DailyCpuLoadStats>`:

**cpuLoadState** `string`

Current CPU load assessment: `'low'` or `'high'`.

**cpuLoadStateReason** `string`

Reason for the current state:

* `'none'` — load is low
* `'encode'` — video encoding is the primary cause of high load
* `'decode'` — video decoding is the primary cause of high load
* `'scheduleDuration'` — Daily code is not completing within its scheduled interval

**stats.latest** `object`

Statistics from the most recent measurement period.

**stats.latest fields**

**timestamp** `number`

Unix timestamp (ms) of when the stats were recorded.

**targetEncodeFrameRate** `number`

Target encode frame rate.

**targetDecodeFrameRate** `number`

Target decode frame rate.

**frameEncodeTimeSec** `number`

Average time in seconds to encode a frame.

**avgFrameDecodeTimeSec** `number`

Average time in seconds to decode a frame.

**cpuUsageBasedOnTargetEncode** `number`

CPU usage estimate based on encode frame rate (0–1).

**cpuUsageBasedOnGlobalDecode** `number`

CPU usage estimate based on decode frame rate (0–1).

**cpuPressureState** `string`

Browser-reported CPU pressure: `'nominal'`, `'fair'`, `'serious'`, `'critical'`, or `null` if not supported.

**scheduleDuration** `number`

Actual schedule interval duration in ms.

**targetScheduleDuration** `number`

Expected schedule interval duration in ms.

**totalReceivedVideoTracks** `number`

Number of incoming video tracks currently being decoded.

**cpuInboundVideoStats** `object[]`

Per-track decode stats. Each entry includes `trackId`, `ssrc`, `frameWidth`, `frameHeight`, `fps`, `frameDecodeTimeSec`, `interFrameDelayStandardDeviation`, and `cpuUsageBasedOnTargetDecode`.

## Example

```javascript theme={null}
const { cpuLoadState, cpuLoadStateReason, stats } = await call.getCpuLoadStats();

if (cpuLoadState === 'high') {
  console.log('High CPU load — reason:', cpuLoadStateReason);
  // Consider reducing video quality
  call.updateSendSettings({ video: { maxQuality: 'low' } });
}
```

## See also

> [card] Methods
>
> * [updateSendSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-send-settings.md)
> * [updateReceiveSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-receive-settings.md)
> * [getNetworkStats()](https://docs.daily.co/reference/daily-js/instance-methods/get-network-stats.md)

> [card] Events
>
> * [cpu-load-change](https://docs.daily.co/reference/daily-js/events/network-events.md#cpu-load-change)

> [card] Guides
>
> * [Call quality](https://docs.daily.co/docs/daily-js/guides/network-quality.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.