forked from getsentry/sentry-cocoa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSentryScreenFrames.h
49 lines (37 loc) · 1.79 KB
/
SentryScreenFrames.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "SentryDefines.h"
#import "SentryProfilingConditionals.h"
NS_ASSUME_NONNULL_BEGIN
#if SENTRY_HAS_UIKIT
/** An array of dictionaries that each contain a start and end timestamp for a rendered frame. */
# if SENTRY_TARGET_PROFILING_SUPPORTED
typedef NSArray<NSDictionary<NSString *, NSNumber *> *> SentryFrameInfoTimeSeries;
# endif // SENTRY_TARGET_PROFILING_SUPPORTED
@interface SentryScreenFrames : NSObject
SENTRY_NO_INIT
- (instancetype)initWithTotal:(NSUInteger)total frozen:(NSUInteger)frozen slow:(NSUInteger)slow;
# if SENTRY_TARGET_PROFILING_SUPPORTED
- (instancetype)initWithTotal:(NSUInteger)total
frozen:(NSUInteger)frozen
slow:(NSUInteger)slow
frameTimestamps:(SentryFrameInfoTimeSeries *)frameTimestamps
frameRateTimestamps:(SentryFrameInfoTimeSeries *)frameRateTimestamps;
# endif // SENTRY_TARGET_PROFILING_SUPPORTED
@property (nonatomic, assign, readonly) NSUInteger total;
@property (nonatomic, assign, readonly) NSUInteger frozen;
@property (nonatomic, assign, readonly) NSUInteger slow;
# if SENTRY_TARGET_PROFILING_SUPPORTED
/**
* Array of dictionaries describing slow/frozen frames' timestamps. Each dictionary start and end
* timestamp for every such frame, keyed under @c start_timestamp and @c end_timestamp.
*/
@property (nonatomic, copy, readonly) SentryFrameInfoTimeSeries *frameTimestamps;
/**
* Array of dictionaries describing the screen refresh rate at all points in time that it changes,
* which can happen when modern devices e.g. go into low power mode. Each dictionary contains keys
* @c timestamp and @c frame_rate.
*/
@property (nonatomic, copy, readonly) SentryFrameInfoTimeSeries *frameRateTimestamps;
# endif // SENTRY_TARGET_PROFILING_SUPPORTED
@end
#endif
NS_ASSUME_NONNULL_END