-
-
Notifications
You must be signed in to change notification settings - Fork 333
/
SentryLaunchProfiling+Tests.h
46 lines (33 loc) · 1.52 KB
/
SentryLaunchProfiling+Tests.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
#import "SentryLaunchProfiling.h"
#if SENTRY_TARGET_PROFILING_SUPPORTED
# import "SentryDefines.h"
@class SentryOptions;
@class SentrySamplerDecision;
@class SentryTracer;
NS_ASSUME_NONNULL_BEGIN
typedef struct {
BOOL shouldProfile;
SentrySamplerDecision *_Nullable tracesDecision;
SentrySamplerDecision *_Nullable profilesDecision;
} SentryLaunchProfileConfig;
SENTRY_EXTERN NSString *const kSentryLaunchProfileConfigKeyTracesSampleRate;
SENTRY_EXTERN NSString *const kSentryLaunchProfileConfigKeyProfilesSampleRate;
SENTRY_EXTERN NSString *const kSentryLaunchProfileConfigKeyContinuousProfiling;
SENTRY_EXTERN SentryTracer *_Nullable sentry_launchTracer;
SentryLaunchProfileConfig sentry_shouldProfileNextLaunch(SentryOptions *options);
/**
* `sentry_shouldProfileNextLaunch` cannot be exposed to Swift tests because its return type is not
* expressible in Swift. This wraps it and only returns the `BOOL shouldProfile` value in the
* struct.
*/
BOOL sentry_willProfileNextLaunch(SentryOptions *options);
/**
* Contains the logic to start a launch profile. Exposed separately from @c
* sentry_startLaunchProfile, because that function wraps everything in a @c dispatch_once , and
* that path is taken once when @c SenryProfiler.load is called at the start of the test suite, and
* can't be executed again by calling that function.
*/
void _sentry_nondeduplicated_startLaunchProfile(void);
SentryTransactionContext *sentry_context(NSNumber *tracesRate);
NS_ASSUME_NONNULL_END
#endif // SENTRY_TARGET_PROFILING_SUPPORTED