mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-14 22:30:40 +01:00

Bug: webrtc:12688 Change-Id: I039cdae7647738d5f17b229c1137b72bf4aa7be0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219580 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34063}
36 lines
978 B
Objective-C
36 lines
978 B
Objective-C
/*
|
|
* Copyright 2015 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#import "ARDStatsBuilder.h"
|
|
|
|
#import "sdk/objc/api/peerconnection/RTCLegacyStatsReport.h"
|
|
#import "sdk/objc/base/RTCMacros.h"
|
|
|
|
#import "ARDUtilities.h"
|
|
|
|
@implementation ARDStatsBuilder
|
|
|
|
@synthesize stats = _stats;
|
|
|
|
- (NSString *)statsString {
|
|
NSMutableString *result = [NSMutableString string];
|
|
|
|
[result appendFormat:@"(cpu)%ld%%\n", (long)ARDGetCpuUsagePercentage()];
|
|
|
|
for (NSString *key in _stats.statistics) {
|
|
RTC_OBJC_TYPE(RTCStatistics) *stat = _stats.statistics[key];
|
|
[result appendFormat:@"%@\n", stat.description];
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
@end
|
|
|