Add QPL marker to track time it takes to load .so file from RN

Summary: Simple diff that adds QPL marker to track time it takes to load .so file used by RN Fabric

Reviewed By: fkgozali

Differential Revision: D13934149

fbshipit-source-id: a5cb0fc255394cf6c936b9018c753dcc774c347f
This commit is contained in:
David Vacca 2019-02-02 11:55:19 -08:00 committed by Facebook Github Bot
parent 28b8b8e370
commit 8110909526
2 changed files with 6 additions and 0 deletions

View File

@ -94,4 +94,6 @@ public enum ReactMarkerConstants {
JAVASCRIPT_EXECUTOR_FACTORY_INJECT_END,
LOAD_REACT_NATIVE_SO_FILE_START,
LOAD_REACT_NATIVE_SO_FILE_END,
LOAD_REACT_NATIVE_FABRIC_SO_FILE_START,
LOAD_REACT_NATIVE_FABRIC_SO_FILE_END,
}

View File

@ -8,6 +8,8 @@ package com.facebook.react.fabric.jsi;
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
import com.facebook.react.bridge.ReactMarker;
import com.facebook.react.bridge.ReactMarkerConstants;
import com.facebook.soloader.SoLoader;
import com.facebook.systrace.Systrace;
@ -22,7 +24,9 @@ public class FabricSoLoader {
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricSoLoader.staticInit::load:fabricjni");
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_START);
SoLoader.loadLibrary("fabricjni");
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_END);
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
}
}