RtcStats
Statistics of a call session.
export class RtcStats { duration?: number; txBytes?: number; rxBytes?: number; txAudioBytes?: number; txVideoBytes?: number; rxAudioBytes?: number; rxVideoBytes?: number; txKBitRate?: number; rxKBitRate?: number; rxAudioKBitRate?: number; txAudioKBitRate?: number; rxVideoKBitRate?: number; txVideoKBitRate?: number; lastmileDelay?: number; userCount?: number; cpuAppUsage?: number; cpuTotalUsage?: number; gatewayRtt?: number; memoryAppUsageRatio?: number; memoryTotalUsageRatio?: number; memoryAppUsageInKbytes?: number; connectTimeMs?: number; firstAudioPacketDuration?: number; firstVideoPacketDuration?: number; firstVideoKeyFramePacketDuration?: number; packetsBeforeFirstKeyFramePacket?: number; firstAudioPacketDurationAfterUnmute?: number; firstVideoPacketDurationAfterUnmute?: number; firstVideoKeyFramePacketDurationAfterUnmute?: number; firstVideoKeyFrameDecodedDurationAfterUnmute?: number; firstVideoKeyFrameRenderedDurationAfterUnmute?: number; txPacketLossRate?: number; rxPacketLossRate?: number; }
Attributes
- duration
- Call duration of the local user in seconds, represented by an aggregate value.
- txBytes
- The number of bytes sent.
- rxBytes
- The number of bytes received.
- txAudioBytes
- The total number of audio bytes sent, represented by an aggregate value.
- txVideoBytes
- The total number of video bytes sent, represented by an aggregate value.
- rxAudioBytes
- The total number of audio bytes received, represented by an aggregate value.
- rxVideoBytes
- The total number of video bytes received, represented by an aggregate value.
- txKBitRate
- The actual bitrate (Kbps) while sending the local video stream.
- rxKBitRate
- The receiving bitrate (Kbps).
- rxAudioKBitRate
- The bitrate (Kbps) of receiving the audio.
- txAudioKBitRate
- The bitrate (Kbps) of sending the audio packet.
- rxVideoKBitRate
- The bitrate (Kbps) of receiving the video.
- txVideoKBitRate
- The bitrate (Kbps) of sending the video.
- lastmileDelay
- The client-to-server delay (milliseconds).
- txPacketLossRate
- The packet loss rate (%) from the client to the Agora server before applying the anti-packet-loss algorithm.
- rxPacketLossRate
- The packet loss rate (%) from the Agora server to the client before using the anti-packet-loss method.
- userCount
- The number of users in the channel.
- cpuAppUsage
- Application CPU usage (%).Attention:
- The value of cpuAppUsage is always reported as 0 in the onLeaveChannel callback.
- cpuTotalUsage
-
The system CPU usage (%).
Attention:- 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.
- connectTimeMs
- The duration (ms) between the SDK starts connecting and the connection is established. If the value reported is 0, it means invalid.
- gatewayRtt
- The round-trip time delay (ms) from the client to the local router.Note:
This property is disabled on devices running iOS 14 or later, and enabled on devices running versions earlier than iOS 14 by default.
To enable this property on devices running iOS 14 or later, technical support.
Note: On Android, to get gatewayRtt, ensure that you add theandroid.permission.ACCESS_WIFI_STATE
permission after</application>
in theAndroidManifest.xml
file in your project. - memoryAppUsageRatio
-
The memory ratio occupied by the app (%).
Attention: This value is for reference only. Due to system limitations, you may not get this value. - memoryTotalUsageRatio
-
The memory occupied by the system (%).
Attention: This value is for reference only. Due to system limitations, you may not get this value. - memoryAppUsageInKbytes
-
The memory size occupied by the app (KB).
Attention: This value is for reference only. Due to system limitations, you may not get this value.