Agora Java API Reference for Android

Public Attributes | List of all members
io.agora.rtc2.IRtcEngineEventHandler.RtcStats Class Reference

Statistics of a call session. More...

## Public Attributes
int | totalDuration
int | txBytes
int | rxBytes
int | txKBitRate
int | txAudioBytes
int | rxAudioBytes
int | txVideoBytes
int | rxVideoBytes
int | rxKBitRate
int | txAudioKBitRate
int | rxAudioKBitRate
int | txVideoKBitRate
int | rxVideoKBitRate
int | lastmileDelay
double | cpuTotalUsage
int | gatewayRtt
double | cpuAppUsage
int | users
int | connectTimeMs
int | txPacketLossRate
int | rxPacketLossRate
double | memoryAppUsageRatio
double | memoryTotalUsageRatio
int | memoryAppUsageInKbytes
int | lanAccelerateState

## Detailed Description

Statistics of a call session.

## Member Data Documentation

## ◆ totalDuration

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.totalDuration

Call duration of the local user in seconds, represented by an aggregate value.

## ◆ txBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txBytes

The number of bytes sent.

## ◆ rxBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxBytes

The number of bytes received.

## ◆ txKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txKBitRate

The actual bitrate (Kbps) while sending the local video stream.

## ◆ txAudioBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txAudioBytes

The total number of audio bytes sent, represented by an aggregate value.

## ◆ rxAudioBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxAudioBytes

The total number of audio bytes received, represented by an aggregate value.

## ◆ txVideoBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txVideoBytes

The total number of video bytes sent, represented by an aggregate value.

## ◆ rxVideoBytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxVideoBytes

The total number of video bytes received, represented by an aggregate value.

## ◆ rxKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxKBitRate

The receiving bitrate (Kbps).

## ◆ txAudioKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txAudioKBitRate

The bitrate (Kbps) of sending the audio packet.

## ◆ rxAudioKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxAudioKBitRate

The bitrate (Kbps) of receiving the audio.

## ◆ txVideoKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txVideoKBitRate

The bitrate (Kbps) of sending the video.

## ◆ rxVideoKBitRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxVideoKBitRate

The bitrate (Kbps) of receiving the video.

## ◆ lastmileDelay

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.lastmileDelay

The client-to-server delay (milliseconds).

## ◆ cpuTotalUsage

double io.agora.rtc2.IRtcEngineEventHandler.RtcStats.cpuTotalUsage

The system CPU usage (%).

Note
  - The value of `cpuTotalUsage` is always reported as 0 in the `onLeaveChannel` callback.
  - As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.

## ◆ gatewayRtt

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.gatewayRtt

The round-trip time delay (ms) from the client to the local router.

Note
  On Android, to get `gatewayRtt`, ensure that you add the `android.permission.ACCESS_WIFI_STATE` permission after `</application>` in the `AndroidManifest.xml` file in your project.

## ◆ cpuAppUsage

double io.agora.rtc2.IRtcEngineEventHandler.RtcStats.cpuAppUsage

Application CPU usage (%).

Note
  - The value of `cpuAppUsage` is always reported as 0 in the `onLeaveChannel` callback.
  - As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.

## ◆ users

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.users

The number of users in the channel.

## ◆ connectTimeMs

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.connectTimeMs

The duration (ms) between the SDK starts connecting and the connection is established. If the value reported is 0, it means invalid.

## ◆ txPacketLossRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.txPacketLossRate

The packet loss rate (%) from the client to the Agora server before applying the anti-packet-loss algorithm.

## ◆ rxPacketLossRate

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.rxPacketLossRate

The packet loss rate (%) from the Agora server to the client before using the anti-packet-loss method.

## ◆ memoryAppUsageRatio

double io.agora.rtc2.IRtcEngineEventHandler.RtcStats.memoryAppUsageRatio

The memory ratio occupied by the app (%).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ memoryTotalUsageRatio

double io.agora.rtc2.IRtcEngineEventHandler.RtcStats.memoryTotalUsageRatio

The memory occupied by the system (%).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ memoryAppUsageInKbytes

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.memoryAppUsageInKbytes

The memory size occupied by the app (KB).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ lanAccelerateState

int io.agora.rtc2.IRtcEngineEventHandler.RtcStats.lanAccelerateState

The local network acceleration state. A value of 1 indicates that local network acceleration is active, while 0 indicates it is inactive. @technical preview