blob: 6fbd59b112800eadb1a4609fc239e700a56aa11f [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
13@class RTCStatistics;
14
15NS_ASSUME_NONNULL_BEGIN
16
17/** A statistics report. Encapsulates a number of RTCStatistics objects. */
18@interface RTCStatisticsReport : NSObject
19
20/** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */
21@property(nonatomic, readonly) CFTimeInterval timestamp_us;
22
23/** RTCStatistics objects by id. */
24@property(nonatomic, readonly) NSDictionary<NSString *, RTCStatistics *> *statistics;
25
26- (instancetype)init NS_UNAVAILABLE;
27
28@end
29
30/** A part of a report (a subreport) covering a certain area. */
31@interface RTCStatistics : NSObject
32
33/** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */
34@property(nonatomic, readonly) NSString *id;
35
36/** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. */
37@property(nonatomic, readonly) CFTimeInterval timestamp_us;
38
39/** The type of the subreport, e.g. "track", "codec". */
40@property(nonatomic, readonly) NSString *type;
41
42/** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551".
43 The values are either NSNumbers or NSStrings, or NSArrays encapsulating NSNumbers
44 or NSStrings. */
45@property(nonatomic, readonly) NSDictionary<NSString *, NSObject *> *values;
46
47- (instancetype)init NS_UNAVAILABLE;
48
49@end
50
51NS_ASSUME_NONNULL_END