RtcStats
Used to collect statistics related to a call session.
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 firstAudioPacketDuration;
int firstVideoPacketDuration;
int firstVideoKeyFramePacketDuration;
int packetsBeforeFirstKeyFramePacket;
int firstAudioPacketDurationAfterUnmute;
int firstVideoPacketDurationAfterUnmute;
int firstVideoKeyFramePacketDurationAfterUnmute;
int firstVideoKeyFrameDecodedDurationAfterUnmute;
int firstVideoKeyFrameRenderedDurationAfterUnmute;
int txPacketLossRate;
int rxPacketLossRate;
int lanAccelerateState;
};
Properties
- duration
- Call duration (seconds) for the local user, as an aggregate value.
- txBytes
- Total number of bytes sent.
- rxBytes
- Total number of bytes received.
- txAudioBytes
- Total number of audio bytes sent, as an aggregate value.
- txVideoBytes
- Total number of video bytes sent, as an aggregate value.
- rxAudioBytes
- Total number of audio bytes received, as an aggregate value.
- rxVideoBytes
- Total number of video bytes received, as an aggregate value.
- txKBitRate
- Actual bitrate (Kbps) of the local video stream sent.
- rxKBitRate
- Total bitrate received (Kbps).
- rxAudioKBitRate
- Bitrate of received audio (Kbps).
- txAudioKBitRate
- Bitrate of sent audio (Kbps).
- rxVideoKBitRate
- Bitrate of received video (Kbps).
- txVideoKBitRate
- Bitrate of sent video (Kbps).
- lastmileDelay
- Network delay from client to server (ms).
- userCount
- Number of users in the channel.
- cpuAppUsage
- CPU usage (%) of the application.
Note:
- In the onLeaveChannel callback, this value is always 0.
- Starting from Android 8.1, this value cannot be retrieved due to system limitations.
- cpuTotalUsage
- CPU usage (%) of the system. On Windows with multiple cores, this is the average CPU usage, calculated as: (100 - system idle progress in Task Manager)/100.
Note:
- In the onLeaveChannel callback, this value is always 0.
- Starting from Android 8.1, this value cannot be retrieved due to system limitations.
- gatewayRtt
- Round-trip time from client to local router (ms).
Note: This property is disabled by default on iOS 14 and above, and enabled by default on iOS versions below 14. To enable it on iOS 14 and above, contact technical support. On Android, add
android.permission.ACCESS_WIFI_STATEpermission after</application>in theAndroidManifest.xmlfile. - memoryAppUsageRatio
- Memory usage ratio (%) of the application.
Note: This value is for reference only and may not be retrievable due to system limitations.
- memoryTotalUsageRatio
- Memory usage ratio (%) of the system.
Note: This value is for reference only and may not be retrievable due to system limitations.
- memoryAppUsageInKbytes
- Memory usage (KB) of the application.
Note: This value is for reference only and may not be retrievable due to system limitations.
- connectTimeMs
- Time taken from SDK start to connection establishment (ms). A value of 0 indicates invalid.
- firstAudioPacketDuration
- Time from app connecting to the channel to receiving the first audio packet (ms). 0 means this field is not applicable.
- firstVideoPacketDuration
- Time from app connecting to the channel to receiving the first video packet (ms). 0 means this field is not applicable.
- firstVideoKeyFramePacketDuration
- Time from app connecting to the channel to receiving the first video key frame (ms). 0 means this field is not applicable.
- packetsBeforeFirstKeyFramePacket
- Number of video packets received before the first video key frame. 0 means this field is not applicable.
- firstAudioPacketDurationAfterUnmute
- Time from last unmuting audio to receiving the first audio packet (ms). 0 means this field is not applicable.
- firstVideoPacketDurationAfterUnmute
- Time from last unmuting video to receiving the first video packet (ms). 0 means this field is not applicable.
- firstVideoKeyFramePacketDurationAfterUnmute
- Time from last unmuting video to receiving the first video key frame (ms). 0 means this field is not applicable.
- firstVideoKeyFrameDecodedDurationAfterUnmute
- Time from last unmuting video to decoding the first video key frame (ms). 0 means this field is not applicable.
- firstVideoKeyFrameRenderedDurationAfterUnmute
- Time from last unmuting video to rendering the first video key frame (ms). 0 means this field is not applicable.
- txPacketLossRate
- Packet loss rate (%) from client to Agora server before applying anti-packet-loss algorithm.
- rxPacketLossRate
- Packet loss rate (%) from Agora server to client before applying anti-packet-loss method.