RtcStats
Call-related statistics.
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; }
}
Properties
- duration
- Call duration of the local user (seconds), cumulative value.
- txBytes
- Bytes sent.
- rxBytes
- Bytes received.
- txAudioBytes
- Audio bytes sent, cumulative value.
- txVideoBytes
- Video bytes sent, cumulative value.
- rxAudioBytes
- Audio bytes received, cumulative value.
- rxVideoBytes
- Video bytes received, cumulative value.
- txKBitRate
- Sending bitrate (Kbps).
- rxKBitRate
- Receiving bitrate (Kbps).
- rxAudioKBitRate
- Audio receiving bitrate (Kbps).
- txAudioKBitRate
- Audio packet sending bitrate (Kbps).
- rxVideoKBitRate
- Video receiving bitrate (Kbps).
- txVideoKBitRate
- Video sending bitrate (Kbps).
- lastmileDelay
- Client-to-access-server latency (ms).
- txPacketLossRate
- Uplink packet loss rate (%) from client to server before anti-packet-loss technology is applied.
- rxPacketLossRate
- Downlink packet loss rate (%) from server to client before anti-packet-loss technology is applied.
- userCount
- Number of users in the current channel.
- cpuAppUsage
- CPU usage of the current app (%).
Note:
- The
cpuAppUsagereported in the OnLeaveChannel callback is always 0. - Starting from Android 8.1, due to system restrictions, you may not be able to obtain CPU usage through this property.
- The
- cpuTotalUsage
- CPU usage of the current system (%).
On Windows, in a multi-core environment, this member represents the average usage of multi-core CPUs. It is calculated as (100 - CPU usage of system idle process shown in Task Manager)/100.
Note:
- The
cpuTotalUsagereported in the OnLeaveChannel callback is always 0. - Starting from Android 8.1, due to system restrictions, you cannot obtain CPU usage through this property.
- The
- connectTimeMs
- Time from connection initiation to successful connection (ms). A value of 0 indicates invalid.
- gatewayRtt
- Round-trip latency from client to local router (ms).
Note: This property is enabled by default on devices running iOS versions earlier than 14 and disabled on iOS 14 and later. To enable this property on devices running iOS 14 and later, please contact technical support. On Android, to retrieve
gatewayRtt, make sure to add theandroid.permission.ACCESS_WIFI_STATEpermission after the</application>tag in your project'sAndroidManifest.xmlfile. - memoryAppUsageRatio
- Memory usage ratio of the current app (%).
Note: This value is for reference only. It may not be available due to system limitations.
- memoryTotalUsageRatio
- Memory usage ratio of the current system (%).
Note: This value is for reference only. It may not be available due to system limitations.
- memoryAppUsageInKbytes
- Memory size of the current app (KB).
Note: This value is for reference only. It may not be available due to system limitations.