> ## 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()`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

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.
</Warning>

## Return value

Returns a `Promise<DailyCpuLoadStats>`:

<ResponseField name="cpuLoadState" type="string">
  Current CPU load assessment: `'low'` or `'high'`.
</ResponseField>

<ResponseField name="cpuLoadStateReason" type="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
</ResponseField>

<ResponseField name="stats.latest" type="object">
  Statistics from the most recent measurement period.

  <Expandable title="stats.latest fields">
    <ResponseField name="timestamp" type="number">Unix timestamp (ms) of when the stats were recorded.</ResponseField>
    <ResponseField name="targetEncodeFrameRate" type="number">Target encode frame rate.</ResponseField>
    <ResponseField name="targetDecodeFrameRate" type="number">Target decode frame rate.</ResponseField>
    <ResponseField name="frameEncodeTimeSec" type="number">Average time in seconds to encode a frame.</ResponseField>
    <ResponseField name="avgFrameDecodeTimeSec" type="number">Average time in seconds to decode a frame.</ResponseField>
    <ResponseField name="cpuUsageBasedOnTargetEncode" type="number">CPU usage estimate based on encode frame rate (0–1).</ResponseField>
    <ResponseField name="cpuUsageBasedOnGlobalDecode" type="number">CPU usage estimate based on decode frame rate (0–1).</ResponseField>
    <ResponseField name="cpuPressureState" type="string">Browser-reported CPU pressure: `'nominal'`, `'fair'`, `'serious'`, `'critical'`, or `null` if not supported.</ResponseField>
    <ResponseField name="scheduleDuration" type="number">Actual schedule interval duration in ms.</ResponseField>
    <ResponseField name="targetScheduleDuration" type="number">Expected schedule interval duration in ms.</ResponseField>
    <ResponseField name="totalReceivedVideoTracks" type="number">Number of incoming video tracks currently being decoded.</ResponseField>
    <ResponseField name="cpuInboundVideoStats" type="object[]">Per-track decode stats. Each entry includes `trackId`, `ssrc`, `frameWidth`, `frameHeight`, `fps`, `frameDecodeTimeSec`, `interFrameDelayStandardDeviation`, and `cpuUsageBasedOnTargetDecode`.</ResponseField>
  </Expandable>
</ResponseField>

## 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

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [updateSendSettings()](/reference/daily-js/instance-methods/update-send-settings)
    * [updateReceiveSettings()](/reference/daily-js/instance-methods/update-receive-settings)
    * [getNetworkStats()](/reference/daily-js/instance-methods/get-network-stats)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [cpu-load-change](/reference/daily-js/events/network-events#cpu-load-change)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Call quality](/docs/daily-js/guides/network-quality)
  </Card>
</CardGroup>
