Agora RTC Objective-C API Reference Refactor

Properties
AgoraChannelStats Class Reference

Inherits <NSObject>.

## Properties
NSUInteger | duration
NSUInteger | txBytes
NSUInteger | rxBytes
NSUInteger | txAudioKBitrate
NSUInteger | rxAudioKBitrate
NSUInteger | txVideoKBitrate
NSUInteger | rxVideoKBitrate
NSUInteger | txAudioBytes
NSUInteger | txVideoBytes
NSUInteger | rxAudioBytes
NSUInteger | rxVideoBytes
NSUInteger | lastmileDelay
NSUInteger | userCount
double | cpuAppUsage
double | cpuTotalUsage
NSInteger | gatewayRtt
double | memoryAppUsageRatio
double | memoryTotalUsageRatio
NSInteger | memoryAppUsageInKbytes
NSInteger | connectTimeMs
NSUInteger | txKBitrate
NSUInteger | rxKBitrate
NSInteger | firstAudioPacketDuration
NSInteger | firstVideoPacketDuration
NSInteger | firstVideoKeyFramePacketDuration
NSInteger | packetsBeforeFirstKeyFramePacket
NSInteger | txPacketLossRate
NSInteger | rxPacketLossRate
NSInteger | lanAccelerateState

## Property Documentation

## ◆ duration

- (NSUInteger) duration
| read write nonatomic assign

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

## ◆ txBytes

- (NSUInteger) txBytes
| read write nonatomic assign

The number of bytes sent.

## ◆ rxBytes

- (NSUInteger) rxBytes
| read write nonatomic assign

The number of bytes received.

## ◆ txAudioKBitrate

- (NSUInteger) txAudioKBitrate
| read write nonatomic assign

The bitrate (Kbps) of sending the audio packet.

## ◆ rxAudioKBitrate

- (NSUInteger) rxAudioKBitrate
| read write nonatomic assign

The bitrate (Kbps) of receiving the audio.

## ◆ txVideoKBitrate

- (NSUInteger) txVideoKBitrate
| read write nonatomic assign

The bitrate (Kbps) of sending the video.

## ◆ rxVideoKBitrate

- (NSUInteger) rxVideoKBitrate
| read write nonatomic assign

The bitrate (Kbps) of receiving the video.

## ◆ txAudioBytes

- (NSUInteger) txAudioBytes
| read write nonatomic assign

The total number of audio bytes sent, represented by an aggregate value.

## ◆ txVideoBytes

- (NSUInteger) txVideoBytes
| read write nonatomic assign

The total number of video bytes sent, represented by an aggregate value.

## ◆ rxAudioBytes

- (NSUInteger) rxAudioBytes
| read write nonatomic assign

The total number of audio bytes received, represented by an aggregate value.

## ◆ rxVideoBytes

- (NSUInteger) rxVideoBytes
| read write nonatomic assign

The total number of video bytes received, represented by an aggregate value.

## ◆ lastmileDelay

- (NSUInteger) lastmileDelay
| read write nonatomic assign

The client-to-server delay (milliseconds).

## ◆ userCount

- (NSUInteger) userCount
| read write nonatomic assign

The number of users in the channel.

## ◆ cpuAppUsage

- (double) cpuAppUsage
| read write nonatomic assign

Application CPU usage (%).

Note
  - The value of `cpuAppUsage` is always reported as 0 in the `rtcEngine:didLeaveChannelWithStats:` callback.

## ◆ cpuTotalUsage

- (double) cpuTotalUsage
| read write nonatomic assign

The system CPU usage (%).

Note
  - The value of `cpuTotalUsage` is always reported as 0 in the `rtcEngine:didLeaveChannelWithStats:` callback.

## ◆ gatewayRtt

- (NSInteger) gatewayRtt
| read write nonatomic assign

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`.

## ◆ memoryAppUsageRatio

- (double) memoryAppUsageRatio
| read write nonatomic assign

The memory ratio occupied by the app (%).

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

## ◆ memoryTotalUsageRatio

- (double) memoryTotalUsageRatio
| read write nonatomic assign

The memory occupied by the system (%).

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

## ◆ memoryAppUsageInKbytes

- (NSInteger) memoryAppUsageInKbytes
| read write nonatomic assign

The memory size occupied by the app (KB).

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

## ◆ connectTimeMs

- (NSInteger) connectTimeMs
| read write nonatomic assign

The duration (ms) between the SDK starts connecting and the connection is established. If the value reported is 0, it means invalid.

## ◆ txKBitrate

- (NSUInteger) txKBitrate
| read write nonatomic assign

The actual bitrate (Kbps) while sending the local video stream.

## ◆ rxKBitrate

- (NSUInteger) rxKBitrate
| read write nonatomic assign

The receiving bitrate (Kbps).

## ◆ firstAudioPacketDuration

- (NSInteger) firstAudioPacketDuration
| read write nonatomic assign

The duration(ms) between first audio packet received and connection start, 0 if not valid

## ◆ firstVideoPacketDuration

- (NSInteger) firstVideoPacketDuration
| read write nonatomic assign

The duration(ms) between first video packet received and connection start, 0 if not valid

## ◆ firstVideoKeyFramePacketDuration

- (NSInteger) firstVideoKeyFramePacketDuration
| read write nonatomic assign

The duration(ms) between first video key frame received and connection start, 0 if not valid

## ◆ packetsBeforeFirstKeyFramePacket

- (NSInteger) packetsBeforeFirstKeyFramePacket
| read write nonatomic assign

Video packet number before first video key frame received, 0 if not valid

## ◆ txPacketLossRate

- (NSInteger) txPacketLossRate
| read write nonatomic assign

The packet loss rate (%) from the client to the Agora server before applying the anti-packet-loss algorithm.

## ◆ rxPacketLossRate

- (NSInteger) rxPacketLossRate
| read write nonatomic assign

The packet loss rate (%) from the Agora server to the client before using the anti-packet-loss method.

## ◆ lanAccelerateState

- (NSInteger) lanAccelerateState
| read write nonatomic assign

The local network acceleration state. A value of 1 indicates that local network acceleration is active, while 0 indicates it is inactive. @technical preview