log native modules init time and config inject time separately
Reviewed By: @tadeuzagallo, @jspahrsummers Differential Revision: D2502620
This commit is contained in:
parent
c15fd8f22c
commit
737e011f96
|
@ -156,8 +156,9 @@ RCT_EXTERN NSArray *RCTGetModuleClasses(void);
|
||||||
// We're not waiting for this complete to leave the dispatch group, since
|
// We're not waiting for this complete to leave the dispatch group, since
|
||||||
// injectJSONConfiguration and executeSourceCode will schedule operations on the
|
// injectJSONConfiguration and executeSourceCode will schedule operations on the
|
||||||
// same queue anyway.
|
// same queue anyway.
|
||||||
|
RCTPerformanceLoggerStart(RCTPLNativeModuleInjectConfig);
|
||||||
[weakSelf injectJSONConfiguration:config onComplete:^(NSError *error) {
|
[weakSelf injectJSONConfiguration:config onComplete:^(NSError *error) {
|
||||||
RCTPerformanceLoggerEnd(RCTPLNativeModuleInit);
|
RCTPerformanceLoggerEnd(RCTPLNativeModuleInjectConfig);
|
||||||
if (error) {
|
if (error) {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[weakSelf stopLoadingWithError:error];
|
[weakSelf stopLoadingWithError:error];
|
||||||
|
@ -295,6 +296,7 @@ RCT_EXTERN NSArray *RCTGetModuleClasses(void);
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTDidCreateNativeModules
|
[[NSNotificationCenter defaultCenter] postNotificationName:RCTDidCreateNativeModules
|
||||||
object:self];
|
object:self];
|
||||||
|
RCTPerformanceLoggerEnd(RCTPLNativeModuleInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupExecutor
|
- (void)setupExecutor
|
||||||
|
|
|
@ -15,6 +15,7 @@ typedef NS_ENUM(NSUInteger, RCTPLTag) {
|
||||||
RCTPLScriptDownload = 0,
|
RCTPLScriptDownload = 0,
|
||||||
RCTPLScriptExecution,
|
RCTPLScriptExecution,
|
||||||
RCTPLNativeModuleInit,
|
RCTPLNativeModuleInit,
|
||||||
|
RCTPLNativeModuleInjectConfig,
|
||||||
RCTPLTTI,
|
RCTPLTTI,
|
||||||
RCTPLSize
|
RCTPLSize
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,6 +33,8 @@ NSArray *RCTPerformanceLoggerOutput(void)
|
||||||
@(RCTPLData[RCTPLScriptExecution][1]),
|
@(RCTPLData[RCTPLScriptExecution][1]),
|
||||||
@(RCTPLData[RCTPLNativeModuleInit][0]),
|
@(RCTPLData[RCTPLNativeModuleInit][0]),
|
||||||
@(RCTPLData[RCTPLNativeModuleInit][1]),
|
@(RCTPLData[RCTPLNativeModuleInit][1]),
|
||||||
|
@(RCTPLData[RCTPLNativeModuleInjectConfig][0]),
|
||||||
|
@(RCTPLData[RCTPLNativeModuleInjectConfig][1]),
|
||||||
@(RCTPLData[RCTPLTTI][0]),
|
@(RCTPLData[RCTPLTTI][0]),
|
||||||
@(RCTPLData[RCTPLTTI][1]),
|
@(RCTPLData[RCTPLTTI][1]),
|
||||||
];
|
];
|
||||||
|
@ -74,6 +76,7 @@ RCT_EXPORT_MODULE()
|
||||||
@"ScriptDownload",
|
@"ScriptDownload",
|
||||||
@"ScriptExecution",
|
@"ScriptExecution",
|
||||||
@"NativeModuleInit",
|
@"NativeModuleInit",
|
||||||
|
@"NativeModuleInjectConfig",
|
||||||
@"TTI",
|
@"TTI",
|
||||||
],
|
],
|
||||||
]];
|
]];
|
||||||
|
|
Loading…
Reference in New Issue