Agora C++ API Reference for All Platforms
agora::rtc::RtcStats Struct Reference

#include <IAgoraRtcEngine.h>

Public Member Functions

 RtcStats ()
 

Public Attributes

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 short txPacketLossRate
 
unsigned short rxPacketLossRate
 
unsigned int userCount
 
double cpuAppUsage
 
double cpuTotalUsage
 
int gatewayRtt
 
double memoryAppUsageRatio
 
double memoryTotalUsageRatio
 
int memoryAppUsageInKbytes
 

Detailed Description

Statistics of the channel.

Constructor & Destructor Documentation

◆ RtcStats()

agora::rtc::RtcStats::RtcStats ( )
inline

Member Data Documentation

◆ duration

unsigned int agora::rtc::RtcStats::duration

Call duration of the local user in seconds, represented by an aggregate value.

◆ txBytes

unsigned int agora::rtc::RtcStats::txBytes

Total number of bytes transmitted, represented by an aggregate value.

◆ rxBytes

unsigned int agora::rtc::RtcStats::rxBytes

Total number of bytes received, represented by an aggregate value.

◆ txAudioBytes

unsigned int agora::rtc::RtcStats::txAudioBytes

Total number of audio bytes sent (bytes), represented by an aggregate value.

◆ txVideoBytes

unsigned int agora::rtc::RtcStats::txVideoBytes

Total number of video bytes sent (bytes), represented by an aggregate value.

◆ rxAudioBytes

unsigned int agora::rtc::RtcStats::rxAudioBytes

Total number of audio bytes received (bytes) before network countermeasures, represented by an aggregate value.

◆ rxVideoBytes

unsigned int agora::rtc::RtcStats::rxVideoBytes

Total number of video bytes received (bytes), represented by an aggregate value.

◆ txKBitRate

unsigned short agora::rtc::RtcStats::txKBitRate

Transmission bitrate (Kbps), represented by an instantaneous value.

◆ rxKBitRate

unsigned short agora::rtc::RtcStats::rxKBitRate

Receive bitrate (Kbps), represented by an instantaneous value.

◆ rxAudioKBitRate

unsigned short agora::rtc::RtcStats::rxAudioKBitRate

Audio receive bitrate (Kbps), represented by an instantaneous value.

◆ txAudioKBitRate

unsigned short agora::rtc::RtcStats::txAudioKBitRate

Audio transmission bitrate (Kbps), represented by an instantaneous value.

◆ rxVideoKBitRate

unsigned short agora::rtc::RtcStats::rxVideoKBitRate

Video receive bitrate (Kbps), represented by an instantaneous value.

◆ txVideoKBitRate

unsigned short agora::rtc::RtcStats::txVideoKBitRate

Video transmission bitrate (Kbps), represented by an instantaneous value.

◆ lastmileDelay

unsigned short agora::rtc::RtcStats::lastmileDelay

Client-server latency (ms)

◆ txPacketLossRate

unsigned short agora::rtc::RtcStats::txPacketLossRate

The packet loss rate (%) from the local client to Agora's edge server, before using the anti-packet-loss method.

◆ rxPacketLossRate

unsigned short agora::rtc::RtcStats::rxPacketLossRate

The packet loss rate (%) from Agora's edge server to the local client, before using the anti-packet-loss method.

◆ userCount

unsigned int agora::rtc::RtcStats::userCount

Number of users in the channel.

  • COMMUNICATION profile: The number of users in the channel.
  • LIVE_BROADCASTING profile:
    • If the local user is an audience: The number of users in the channel = The number of hosts in the channel + 1.
    • If the user is a host: The number of users in the channel = The number of hosts in the channel.

◆ cpuAppUsage

double agora::rtc::RtcStats::cpuAppUsage

Application CPU usage (%).

Note
  • The cpuAppUsage reported in the onLeaveChannel callback is always 0.
  • As of Android 8.1, you might not be able to get the CPU usage from this attribute due to system limitations.

◆ cpuTotalUsage

double agora::rtc::RtcStats::cpuTotalUsage

System CPU usage (%).

In the multi-kernel environment, this member represents the average CPU usage. The value **=** 100 - System Idle Progress in Task Manager (%).

Note
  • The cpuTotalUsage reported in the onLeaveChannel callback is always 0.
  • As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.

◆ gatewayRtt

int agora::rtc::RtcStats::gatewayRtt

The round-trip time delay from the client to the local router.

Note
  • On iOS, As of v3.3.0, this attribute 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, contact support@agora.io. See FAQ for details.
  • On Android, to get this attribute, ensure that the android.permission.ACCESS_WIFI_STATE permission has been added after </application> in the AndroidManifest.xml file in your project.

◆ memoryAppUsageRatio

double agora::rtc::RtcStats::memoryAppUsageRatio

The memory usage ratio of the app (%).

Note
This value is for reference only. Due to system limitations, you may not get the value of this member.

◆ memoryTotalUsageRatio

double agora::rtc::RtcStats::memoryTotalUsageRatio

The memory usage ratio of the system (%).

Note
This value is for reference only. Due to system limitations, you may not get the value of this member.

◆ memoryAppUsageInKbytes

int agora::rtc::RtcStats::memoryAppUsageInKbytes

The memory usage of the app (KB).

Note
This value is for reference only. Due to system limitations, you may not get the value of this member.