mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 08:30:34 +00:00
annotate "CREATE_MODULE" QP log with the name of the module being created
Reviewed By: achen1 Differential Revision: D4513001 fbshipit-source-id: b98024796c0b0cd2489a67bf0695c86d994689d6
This commit is contained in:
parent
c7c3e4c5d8
commit
15ceed4069
@ -13,10 +13,10 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
public class ReactMarker {
|
||||
|
||||
public interface MarkerListener {
|
||||
void logMarker(String name);
|
||||
void logMarker(String name, @Nullable String tag);
|
||||
};
|
||||
|
||||
@Nullable static private MarkerListener sMarkerListener = null;
|
||||
private static @Nullable MarkerListener sMarkerListener = null;
|
||||
|
||||
public static void setMarkerListener(MarkerListener listener) {
|
||||
SoftAssertions.assertCondition(
|
||||
@ -27,8 +27,13 @@ public class ReactMarker {
|
||||
|
||||
@DoNotStrip
|
||||
public static void logMarker(String name) {
|
||||
logMarker(name, null);
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
public static void logMarker(String name, String tag) {
|
||||
if (sMarkerListener != null) {
|
||||
sMarkerListener.logMarker(name);
|
||||
sMarkerListener.logMarker(name, tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class ModuleHolder {
|
||||
private NativeModule create() {
|
||||
boolean isEagerModule = mModule != null;
|
||||
if (!isEagerModule) {
|
||||
ReactMarker.logMarker(CREATE_MODULE_START);
|
||||
ReactMarker.logMarker(CREATE_MODULE_START, mName);
|
||||
}
|
||||
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createModule")
|
||||
.arg("name", mName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user