RtcStats
Statistics of a call session.
class RtcStats { const RtcStats( {this.duration, this.txBytes, this.rxBytes, this.txAudioBytes, this.txVideoBytes, this.rxAudioBytes, this.rxVideoBytes, this.txKBitRate, this.rxKBitRate, this.rxAudioKBitRate, this.txAudioKBitRate, this.rxVideoKBitRate, this.txVideoKBitRate, this.lastmileDelay, this.userCount, this.cpuAppUsage, this.cpuTotalUsage, this.gatewayRtt, this.memoryAppUsageRatio, this.memoryTotalUsageRatio, this.memoryAppUsageInKbytes, this.connectTimeMs, this.firstAudioPacketDuration, this.firstVideoPacketDuration, this.firstVideoKeyFramePacketDuration, this.packetsBeforeFirstKeyFramePacket, this.firstAudioPacketDurationAfterUnmute, this.firstVideoPacketDurationAfterUnmute, this.firstVideoKeyFramePacketDurationAfterUnmute, this.firstVideoKeyFrameDecodedDurationAfterUnmute, this.firstVideoKeyFrameRenderedDurationAfterUnmute, this.txPacketLossRate, this.rxPacketLossRate}); @JsonKey(name: 'duration') final int? duration; @JsonKey(name: 'txBytes') final int? txBytes; @JsonKey(name: 'rxBytes') final int? rxBytes; @JsonKey(name: 'txAudioBytes') final int? txAudioBytes; @JsonKey(name: 'txVideoBytes') final int? txVideoBytes; @JsonKey(name: 'rxAudioBytes') final int? rxAudioBytes; @JsonKey(name: 'rxVideoBytes') final int? rxVideoBytes; @JsonKey(name: 'txKBitRate') final int? txKBitRate; @JsonKey(name: 'rxKBitRate') final int? rxKBitRate; @JsonKey(name: 'rxAudioKBitRate') final int? rxAudioKBitRate; @JsonKey(name: 'txAudioKBitRate') final int? txAudioKBitRate; @JsonKey(name: 'rxVideoKBitRate') final int? rxVideoKBitRate; @JsonKey(name: 'txVideoKBitRate') final int? txVideoKBitRate; @JsonKey(name: 'lastmileDelay') final int? lastmileDelay; @JsonKey(name: 'userCount') final int? userCount; @JsonKey(name: 'cpuAppUsage') final double? cpuAppUsage; @JsonKey(name: 'cpuTotalUsage') final double? cpuTotalUsage; @JsonKey(name: 'gatewayRtt') final int? gatewayRtt; @JsonKey(name: 'memoryAppUsageRatio') final double? memoryAppUsageRatio; @JsonKey(name: 'memoryTotalUsageRatio') final double? memoryTotalUsageRatio; @JsonKey(name: 'memoryAppUsageInKbytes') final int? memoryAppUsageInKbytes; @JsonKey(name: 'connectTimeMs') final int? connectTimeMs; @JsonKey(name: 'firstAudioPacketDuration') final int? firstAudioPacketDuration; @JsonKey(name: 'firstVideoPacketDuration') final int? firstVideoPacketDuration; @JsonKey(name: 'firstVideoKeyFramePacketDuration') final int? firstVideoKeyFramePacketDuration; @JsonKey(name: 'packetsBeforeFirstKeyFramePacket') final int? packetsBeforeFirstKeyFramePacket; @JsonKey(name: 'firstAudioPacketDurationAfterUnmute') final int? firstAudioPacketDurationAfterUnmute; @JsonKey(name: 'firstVideoPacketDurationAfterUnmute') final int? firstVideoPacketDurationAfterUnmute; @JsonKey(name: 'firstVideoKeyFramePacketDurationAfterUnmute') final int? firstVideoKeyFramePacketDurationAfterUnmute; @JsonKey(name: 'firstVideoKeyFrameDecodedDurationAfterUnmute') final int? firstVideoKeyFrameDecodedDurationAfterUnmute; @JsonKey(name: 'firstVideoKeyFrameRenderedDurationAfterUnmute') final int? firstVideoKeyFrameRenderedDurationAfterUnmute; @JsonKey(name: 'txPacketLossRate') final int? txPacketLossRate; @JsonKey(name: 'rxPacketLossRate') final int? rxPacketLossRate; factory RtcStats.fromJson(Map<String, dynamic> json) => _$RtcStatsFromJson(json); Map<String, dynamic> toJson() => _$RtcStatsToJson(this); }
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.
- 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.