RtcStats
Statistics of a call session.
public class RtcStats { public RtcStats() { } public RtcStats(uint duration, uint txBytes, uint rxBytes, uint txAudioBytes, uint txVideoBytes, uint rxAudioBytes, uint rxVideoBytes, UInt16 txKBitRate, UInt16 rxKBitRate, UInt16 rxAudioKBitRate, UInt16 txAudioKBitRate, UInt16 rxVideoKBitRate, UInt16 txVideoKBitRate, UInt16 lastmileDelay, uint userCount, double cpuAppUsage, double cpuTotalUsage, int gatewayRtt, double memoryAppUsageRatio, double memoryTotalUsageRatio, int memoryAppUsageInKbytes, int connectTimeMs, int txPacketLossRate, int rxPacketLossRate) { this.duration = duration; this.txBytes = txBytes; this.rxBytes = rxBytes; this.txAudioBytes = txAudioBytes; this.txVideoBytes = txVideoBytes; this.rxAudioBytes = rxAudioBytes; this.rxVideoBytes = rxVideoBytes; this.txKBitRate = txKBitRate; this.rxKBitRate = rxKBitRate; this.rxAudioKBitRate = rxAudioKBitRate; this.txAudioKBitRate = txAudioKBitRate; this.rxVideoKBitRate = rxVideoKBitRate; this.txVideoKBitRate = txVideoKBitRate; this.lastmileDelay = lastmileDelay; this.userCount = userCount; this.cpuAppUsage = cpuAppUsage; this.cpuTotalUsage = cpuTotalUsage; this.gatewayRtt = gatewayRtt; this.memoryAppUsageRatio = memoryAppUsageRatio; this.memoryTotalUsageRatio = memoryTotalUsageRatio; this.memoryAppUsageInKbytes = memoryAppUsageInKbytes; this.connectTimeMs = connectTimeMs; this.txPacketLossRate = txPacketLossRate; this.rxPacketLossRate = rxPacketLossRate; } public uint duration { set; get; } public uint txBytes { set; get; } public uint rxBytes { set; get; } public uint txAudioBytes { set; get; } public uint txVideoBytes { set; get; } public uint rxAudioBytes { set; get; } public uint rxVideoBytes { set; get; } public ushort txKBitRate { set; get; } public ushort rxKBitRate { set; get; } public ushort rxAudioKBitRate { set; get; } public ushort txAudioKBitRate { set; get; } public ushort rxVideoKBitRate { set; get; } public ushort txVideoKBitRate { set; get; } public ushort lastmileDelay { set; get; } public uint userCount { set; get; } public double cpuAppUsage { set; get; } public double cpuTotalUsage { set; get; } public int gatewayRtt { set; get; } public double memoryAppUsageRatio { set; get; } public double memoryTotalUsageRatio { set; get; } public int memoryAppUsageInKbytes { set; get; } public int connectTimeMs { set; get; } public int txPacketLossRate { set; get; } public int rxPacketLossRate { set; get; } }
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.
- As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.
- cpuTotalUsage
-
The system CPU usage (%).
For Windows, in the multi-kernel environment, this member represents the average CPU usage. The value = (100 - System Idle Progress in Task Manager)/100.
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.