blob: 06dbf48d88889ddb28131551ce95b8cdf1ebaa4e [file] [log] [blame]
Peter Hanspersbed86042019-02-21 17:27:09 +01001/*
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 Bargen87a6e5a2020-05-14 12:41:53 +000013#import "RTCMacros.h"
14
15@class RTC_OBJC_TYPE(RTCStatistics);
Peter Hanspersbed86042019-02-21 17:27:09 +010016
17NS_ASSUME_NONNULL_BEGIN
18
19/** A statistics report. Encapsulates a number of RTCStatistics objects. */
Danilo Bargen87a6e5a2020-05-14 12:41:53 +000020RTC_OBJC_EXPORT
21@interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject
Peter Hanspersbed86042019-02-21 17:27:09 +010022
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 Bargen87a6e5a2020-05-14 12:41:53 +000027@property(nonatomic, readonly) NSDictionary<NSString *, RTC_OBJC_TYPE(RTCStatistics) *> *statistics;
Peter Hanspersbed86042019-02-21 17:27:09 +010028
29- (instancetype)init NS_UNAVAILABLE;
30
31@end
32
33/** A part of a report (a subreport) covering a certain area. */
Danilo Bargen87a6e5a2020-05-14 12:41:53 +000034RTC_OBJC_EXPORT
35@interface RTC_OBJC_TYPE (RTCStatistics) : NSObject
Peter Hanspersbed86042019-02-21 17:27:09 +010036
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 Lee0a52ede2021-05-22 08:41:02 +090047 The values are either NSNumbers or NSStrings or NSArrays encapsulating NSNumbers
48 or NSStrings, or NSDictionary of NSString keys to NSNumber values. */
Peter Hanspersbed86042019-02-21 17:27:09 +010049@property(nonatomic, readonly) NSDictionary<NSString *, NSObject *> *values;
50
51- (instancetype)init NS_UNAVAILABLE;
52
53@end
54
55NS_ASSUME_NONNULL_END