mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 11:16:06 +08:00
log native module initialization time
Reviewed By: alexeylang Differential Revision: D4640369 fbshipit-source-id: 9d1ec353d9b8c4bccb5eedea1fc5d0f6cb414985
This commit is contained in:
committed by
Facebook Github Bot
parent
f9a3ed3793
commit
9f68d95943
@@ -60,4 +60,6 @@ public class ReactMarkerConstants {
|
||||
"CREATE_I18N_ASSETS_MODULE_END";
|
||||
public static final String GET_CONSTANTS_START = "GET_CONSTANTS_START";
|
||||
public static final String GET_CONSTANTS_END = "GET_CONSTANTS_END";
|
||||
public static final String INITIALIZE_MODULE_START = "INITIALIZE_MODULE_START";
|
||||
public static final String INITIALIZE_MODULE_END = "INITIALIZE_MODULE_END";
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.concurrent.ExecutionException;
|
||||
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactMarker;
|
||||
import com.facebook.react.bridge.ReactMarkerConstants;
|
||||
import com.facebook.react.common.futures.SimpleSettableFuture;
|
||||
import com.facebook.systrace.Systrace;
|
||||
import com.facebook.systrace.SystraceMessage;
|
||||
@@ -122,7 +123,9 @@ public class ModuleHolder {
|
||||
section.arg("name", mName);
|
||||
}
|
||||
section.flush();
|
||||
ReactMarker.logMarker(ReactMarkerConstants.INITIALIZE_MODULE_START, mName);
|
||||
callInitializeOnUiThread(module);
|
||||
ReactMarker.logMarker(ReactMarkerConstants.INITIALIZE_MODULE_END);
|
||||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user