TRTCStatistics

TRTCStatistics

Network and performance metrics

Constructor

new TRTCStatistics(upLoss, downLoss, appCpu, systemCpu, rtt, receivedBytes, sentBytes, localStatisticsArray, localStatisticsArraySize, remoteStatisticsArray, remoteStatisticsArraySize, gatewayRtt, systemMemoryInMB, systemMemoryUsageInMB, appMemoryUsageInMB)

Parameters:
Name Type Description
upLoss Number required

upstream packet loss rate (%) from the SDK to cloud. The smaller the value, the better. If upLoss is 0%, the upstream network quality is very good, and the data packets uploaded to the cloud are basically not lost. If upLoss is 30%, 30% of the audio/video data packets sent to the cloud by the SDK are lost on the transfer linkage.

downLoss Number required

downstream packet loss rate (%) from cloud to the SDK. The smaller the value, the better. If downLoss is 0%, the downstream network quality is very good, and the data packets received from the cloud are basically not lost. If downLoss is 30%, 30% of the audio/video data packets sent to the SDK by the cloud are lost on the transfer linkage.

appCpu Number required

CPU utilization (%) of the current application

systemCpu Number required

CPU utilization (%) of the current system

rtt Number required

round-trip delay (ms) from the SDK to cloud.
This value represents the total time it takes to send a network packet from the SDK to the cloud and then send a network packet back from the cloud to the SDK, i.e., the total time it takes for a network packet to go through the linkage of "SDK -> cloud -> SDK". The smaller the value, the better. If rtt is below 50 ms, it means a short audio/video call delay; if rtt is above 200 ms, it means a long audio/video call delay. It should be explained that rtt represents the total time spent on the linkage of "SDK -> cloud -> SDK"; therefore, there is no need to distinguish between upRtt and downRtt.

receivedBytes Number required

total number of received bytes (including signaling data and audio/video data)

sentBytes Number required

total number of sent bytes (including signaling data and audio/video data)

localStatisticsArray Array.<TRTCLocalStatistics> required

local audio/video statistics. As there may be three local audio/video streams (i.e., HD big image, smooth small image, and substream image), the local audio/video statistics are an array.

localStatisticsArraySize Number required

localStatisticsArray array size

remoteStatisticsArray Array.<TRTCRemoteStatistics> required

remote audio/video statistics. As there may be multiple concurrent remote users, and each of them may have multiple concurrent audio/video streams (i.e., HD big image, smooth small image, and substream image), the remote audio/video statistics are an array.

remoteStatisticsArraySize Number required

remoteStatisticsArray array size

gatewayRtt Number required

round-trip delay (ms) from the SDK to client gatewaty, unit: ms.
This value represents the total time taken for a network packet to be sent from the SDK to the local router gateway, and then for the gateway to send the packet back to the SDK, completing the "SDK>gateway>SDK" round trip. The smaller this value, the better: if gatewayRtt is less than 50ms, it indicates low audio and video call latency; if gatewayRtt is greater than 200ms, it indicates high audio and video call latency.

systemMemoryInMB Number required

System memory size, unit: MB.

systemMemoryUsageInMB Number required

System memory size in usage, unit: MB.

appMemoryUsageInMB Number required

Application memory size, unit: MB.