Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import <Foundation/Foundation.h> |
| 12 | |
Danilo Bargen | 87a6e5a | 2020-05-14 12:41:53 +0000 | [diff] [blame] | 13 | #import "RTCMacros.h" |
| 14 | |
| 15 | @class RTC_OBJC_TYPE(RTCStatistics); |
Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 16 | |
| 17 | NS_ASSUME_NONNULL_BEGIN |
| 18 | |
| 19 | /** A statistics report. Encapsulates a number of RTCStatistics objects. */ |
Danilo Bargen | 87a6e5a | 2020-05-14 12:41:53 +0000 | [diff] [blame] | 20 | RTC_OBJC_EXPORT |
| 21 | @interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject |
Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 22 | |
| 23 | /** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */ |
| 24 | @property(nonatomic, readonly) CFTimeInterval timestamp_us; |
| 25 | |
| 26 | /** RTCStatistics objects by id. */ |
Danilo Bargen | 87a6e5a | 2020-05-14 12:41:53 +0000 | [diff] [blame] | 27 | @property(nonatomic, readonly) NSDictionary<NSString *, RTC_OBJC_TYPE(RTCStatistics) *> *statistics; |
Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 28 | |
| 29 | - (instancetype)init NS_UNAVAILABLE; |
| 30 | |
| 31 | @end |
| 32 | |
| 33 | /** A part of a report (a subreport) covering a certain area. */ |
Danilo Bargen | 87a6e5a | 2020-05-14 12:41:53 +0000 | [diff] [blame] | 34 | RTC_OBJC_EXPORT |
| 35 | @interface RTC_OBJC_TYPE (RTCStatistics) : NSObject |
Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 36 | |
| 37 | /** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */ |
| 38 | @property(nonatomic, readonly) NSString *id; |
| 39 | |
| 40 | /** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. */ |
| 41 | @property(nonatomic, readonly) CFTimeInterval timestamp_us; |
| 42 | |
| 43 | /** The type of the subreport, e.g. "track", "codec". */ |
| 44 | @property(nonatomic, readonly) NSString *type; |
| 45 | |
| 46 | /** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551". |
Byoungchan Lee | 0a52ede | 2021-05-22 08:41:02 +0900 | [diff] [blame] | 47 | The values are either NSNumbers or NSStrings or NSArrays encapsulating NSNumbers |
| 48 | or NSStrings, or NSDictionary of NSString keys to NSNumber values. */ |
Peter Hanspers | bed8604 | 2019-02-21 17:27:09 +0100 | [diff] [blame] | 49 | @property(nonatomic, readonly) NSDictionary<NSString *, NSObject *> *values; |
| 50 | |
| 51 | - (instancetype)init NS_UNAVAILABLE; |
| 52 | |
| 53 | @end |
| 54 | |
| 55 | NS_ASSUME_NONNULL_END |