RtcStats
Statistics of the channel.
struct RtcStats { unsigned int duration; unsigned int txBytes; unsigned int rxBytes; unsigned int txAudioBytes; unsigned int txVideoBytes; unsigned int rxAudioBytes; unsigned int rxVideoBytes; unsigned short txKBitRate; unsigned short rxKBitRate; unsigned short rxAudioKBitRate; unsigned short txAudioKBitRate; unsigned short rxVideoKBitRate; unsigned short txVideoKBitRate; unsigned short lastmileDelay; unsigned int userCount; double cpuAppUsage; double cpuTotalUsage; int gatewayRtt; double memoryAppUsageRatio; double memoryTotalUsageRatio; int memoryAppUsageInKbytes; int connectTimeMs; int txPacketLossRate; int rxPacketLossRate; RtcStats() : duration(0), txBytes(0), rxBytes(0), txAudioBytes(0), txVideoBytes(0), rxAudioBytes(0), rxVideoBytes(0), txKBitRate(0), rxKBitRate(0), rxAudioKBitRate(0), txAudioKBitRate(0), rxVideoKBitRate(0), txVideoKBitRate(0), lastmileDelay(0), userCount(0), cpuAppUsage(0.0), cpuTotalUsage(0.0), gatewayRtt(0), memoryAppUsageRatio(0.0), memoryTotalUsageRatio(0.0), memoryAppUsageInKbytes(0), connectTimeMs(0), txPacketLossRate(0), rxPacketLossRate(0) {} };
Attributes
- duration
- Call duration of the local user in seconds, represented by an aggregate value.
- txBytes
- Total number of bytes transmitted, represented by an aggregate value.
- rxBytes
- Total number of bytes received, represented by an aggregate value.
- txAudioBytes
- 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
- Video transmission bitrate (Kbps), represented by an instantaneous value.
- rxKBitRate
- The receiving bitrate (Kbps), represented by an instantaneous value.
- rxAudioKBitRate
- Audio receive bitrate (Kbps), represented by an instantaneous value.
- txAudioKBitRate
- The bitrate (Kbps) of sending the audio packet.
- rxVideoKBitRate
- Video receive bitrate (Kbps), represented by an instantaneous value.
- txVideoKBitRate
- The bitrate (Kbps) of sending the video.
- lastmileDelay
- The client-to-server delay (ms).
- 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 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.
- 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: On Android, to get gatewayRtt, ensure that you add the
android.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.