-
-
Notifications
You must be signed in to change notification settings - Fork 343
/
Copy pathSentryFramesTracker.h
60 lines (40 loc) · 1.76 KB
/
SentryFramesTracker.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
50
51
52
53
54
55
56
57
58
59
60
#import "SentryDefines.h"
#if SENTRY_HAS_UIKIT
# import "SentryProfilingConditionals.h"
@class SentryOptions, SentryDisplayLinkWrapper, SentryScreenFrames;
@class SentryCurrentDateProvider;
@class SentryDispatchQueueWrapper;
NS_ASSUME_NONNULL_BEGIN
@class SentryTracer;
@protocol SentryFramesTrackerListener
- (void)framesTrackerHasNewFrame:(NSDate *)newFrameDate;
@end
/**
* Tracks total, frozen and slow frames for iOS, tvOS, and Mac Catalyst.
*/
@interface SentryFramesTracker : NSObject
- (instancetype)initWithDisplayLinkWrapper:(SentryDisplayLinkWrapper *)displayLinkWrapper
dateProvider:(SentryCurrentDateProvider *)dateProvider
dispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispatchQueueWrapper
keepDelayedFramesDuration:(CFTimeInterval)keepDelayedFramesDuration;
@property (nonatomic, assign, readonly) SentryScreenFrames *currentFrames;
@property (nonatomic, assign, readonly) BOOL isRunning;
# if SENTRY_TARGET_PROFILING_SUPPORTED
/** Remove previously recorded timestamps in preparation for a later profiled transaction. */
- (void)resetProfilingTimestamps;
# endif // SENTRY_TARGET_PROFILING_SUPPORTED
- (void)start;
- (void)stop;
/*
* Returns the frames delay for the passed time period. If the method can't calculate the frames
* delay, it returns -1.
*/
- (CFTimeInterval)getFramesDelay:(uint64_t)startSystemTimestamp
endSystemTimestamp:(uint64_t)endSystemTimestamp;
- (void)addListener:(id<SentryFramesTrackerListener>)listener;
- (void)removeListener:(id<SentryFramesTrackerListener>)listener;
@end
BOOL sentryShouldAddSlowFrozenFramesData(
NSInteger totalFrames, NSInteger slowFrames, NSInteger frozenFrames);
NS_ASSUME_NONNULL_END
#endif // SENTRY_HAS_UIKIT