# AgoraChannelStats (/zh-CN/api-reference/rtc/macos/class-rtcstats)
> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).
```objc
__attribute__((visibility("default"))) @interface AgoraChannelStats : NSObject
@property(assign, nonatomic) NSUInteger duration;
@property(assign, nonatomic) NSUInteger txBytes;
@property(assign, nonatomic) NSUInteger rxBytes;
@property(assign, nonatomic) NSUInteger txAudioKBitrate;
@property(assign, nonatomic) NSUInteger rxAudioKBitrate;
@property(assign, nonatomic) NSUInteger txVideoKBitrate;
@property(assign, nonatomic) NSUInteger rxVideoKBitrate;
@property(assign, nonatomic) NSUInteger txAudioBytes;
@property(assign, nonatomic) NSUInteger txVideoBytes;
@property(assign, nonatomic) NSUInteger rxAudioBytes;
@property(assign, nonatomic) NSUInteger rxVideoBytes;
@property(assign, nonatomic) NSUInteger lastmileDelay;
@property(assign, nonatomic) NSUInteger userCount;
@property(assign, nonatomic) double cpuAppUsage;
@property(assign, nonatomic) double cpuTotalUsage;
@property(assign, nonatomic) NSInteger gatewayRtt;
@property(assign, nonatomic) double memoryAppUsageRatio;
@property(assign, nonatomic) double memoryTotalUsageRatio;
@property(assign, nonatomic) NSInteger memoryAppUsageInKbytes;
@property(assign, nonatomic) NSInteger connectTimeMs;
@property(assign, nonatomic) NSUInteger txKBitrate;
@property(assign, nonatomic) NSUInteger rxKBitrate;
@property(assign, nonatomic) NSInteger firstAudioPacketDuration;
@property(assign, nonatomic) NSInteger firstVideoPacketDuration;
@property(assign, nonatomic) NSInteger firstVideoKeyFramePacketDuration;
@property(assign, nonatomic) NSInteger packetsBeforeFirstKeyFramePacket;
@property(assign, nonatomic) NSInteger txPacketLossRate;
@property(assign, nonatomic) NSInteger rxPacketLossRate;
@property(assign, nonatomic) NSInteger lanAccelerateState;
@end
```
## 属性 [#属性]
本地用户通话时长,单位为秒,表示为累计值。
发送的字节数。
接收的字节数。
音频发送码率,单位为 Kbps。
音频接收码率,单位为 Kbps。
视频发送码率,单位为 Kbps。
视频接收码率,单位为 Kbps。
发送的音频字节总数,表示为累计值。
发送的视频字节总数,表示为累计值。
接收的音频字节总数,表示为累计值。
接收的视频字节总数,表示为累计值。
客户端到服务器的延迟,单位为毫秒。
频道中的用户数。
应用程序的 CPU 使用率(%)。
:::note
注: 在 [rtcEngine\:didLeaveChannelWithStats:](/zh-CN/api-reference/rtc/macos/channel#callback_irtcengineeventhandler_onleavechannel) 回调中,该值始终为 0。
:::
系统的 CPU 使用率(%)。
:::note
注: 在 [rtcEngine\:didLeaveChannelWithStats:](/zh-CN/api-reference/rtc/macos/channel#callback_irtcengineeventhandler_onleavechannel) 回调中,该值始终为 0。
:::
客户端到本地路由器的往返时延,单位为毫秒。
:::note
注: 该属性在运行 iOS 14 或更高版本的设备上默认禁用,在运行早期版本的设备上默认启用。要在 iOS 14 或更高版本的设备上启用该属性,请[联系技术支持](https://ticket.shengwang.cn/)。
:::
应用程序占用的内存比例(%)。
:::note
注: 该值仅供参考。由于系统限制,可能无法获取该值。
:::
系统占用的内存比例(%)。
:::note
注: 该值仅供参考。由于系统限制,可能无法获取该值。
:::
应用程序占用的内存大小,单位为 KB。
:::note
注: 该值仅供参考。由于系统限制,可能无法获取该值。
:::
从 SDK 开始连接到连接建立之间的耗时,单位为毫秒。若值为 0,表示无效。
本地视频流发送时的实际码率,单位为 Kbps。
接收码率,单位为 Kbps。
从连接开始到接收到首个音频包的耗时,单位为毫秒。若值为 0,表示无效。
从连接开始到接收到首个视频包的耗时,单位为毫秒。若值为 0,表示无效。
从连接开始到接收到首个视频关键帧的耗时,单位为毫秒。若值为 0,表示无效。
在接收到首个视频关键帧前接收到的视频包数量。若值为 0,表示无效。
应用抗丢包算法前,客户端到声网服务器的丢包率(%)。
使用抗丢包方法前,声网服务器到客户端的丢包率(%)。