forked from getsentry/sentry-cocoa
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSentryAppStartMeasurement.h
69 lines (56 loc) · 2.26 KB
/
SentryAppStartMeasurement.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
61
62
63
64
65
66
67
68
69
#import "SentryDefines.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, SentryAppStartType) {
SentryAppStartTypeWarm,
SentryAppStartTypeCold,
SentryAppStartTypeUnknown,
};
@interface SentryAppStartMeasurement : NSObject
SENTRY_NO_INIT
/**
* Initializes SentryAppStartMeasurement with the given parameters.
*/
- (instancetype)initWithType:(SentryAppStartType)type
appStartTimestamp:(NSDate *)appStartTimestamp
duration:(NSTimeInterval)duration
runtimeInitTimestamp:(NSDate *)runtimeInitTimestamp
didFinishLaunchingTimestamp:(NSDate *)didFinishLaunchingTimestamp
DEPRECATED_MSG_ATTRIBUTE("Use "
"initWithType:appStartTimestamp:duration:mainTimestamp:"
"runtimeInitTimestamp:didFinishLaunchingTimestamp instead.");
/**
* Initializes SentryAppStartMeasurement with the given parameters.
*/
- (instancetype)initWithType:(SentryAppStartType)type
appStartTimestamp:(NSDate *)appStartTimestamp
duration:(NSTimeInterval)duration
runtimeInitTimestamp:(NSDate *)runtimeInitTimestamp
moduleInitializationTimestamp:(NSDate *)moduleInitializationTimestamp
didFinishLaunchingTimestamp:(NSDate *)didFinishLaunchingTimestamp;
/**
* The type of the app start.
*/
@property (readonly, nonatomic, assign) SentryAppStartType type;
/**
* How long the app start took. From appStartTimestamp to when the SDK creates the
* AppStartMeasurement, which is done when the OS posts UIWindowDidBecomeVisibleNotification.
*/
@property (readonly, nonatomic, assign) NSTimeInterval duration;
/**
* The timestamp when the app started, which is the process start timestamp.
*/
@property (readonly, nonatomic, strong) NSDate *appStartTimestamp;
/**
* When the runtime was initialized / when SentryAppStartTracker is added to the Objective-C runtime
*/
@property (readonly, nonatomic, strong) NSDate *runtimeInitTimestamp;
/**
* When application main function is called.
*/
@property (readonly, nonatomic, strong) NSDate *moduleInitializationTimestamp;
/**
* When OS posts UIApplicationDidFinishLaunchingNotification.
*/
@property (readonly, nonatomic, strong) NSDate *didFinishLaunchingTimestamp;
@end
NS_ASSUME_NONNULL_END