Add REGISTER_JS_SEGMENT perf markers

Reviewed By: cwdick

Differential Revision: D9244289

fbshipit-source-id: 9004a0405f9622cbd0bbb837b99df32454f35bb8
This commit is contained in:
Alex Dvornikov 2018-08-10 09:26:18 -07:00 committed by Facebook Github Bot
parent 87f5463c0e
commit 1cd9aa2dea
4 changed files with 12 additions and 0 deletions

View File

@ -121,6 +121,8 @@ static void registerPerformanceLoggerHooks(RCTPerformanceLogger *performanceLogg
case ReactMarker::JS_BUNDLE_STRING_CONVERT_STOP:
case ReactMarker::NATIVE_MODULE_SETUP_START:
case ReactMarker::NATIVE_MODULE_SETUP_STOP:
case ReactMarker::REGISTER_JS_SEGMENT_START:
case ReactMarker::REGISTER_JS_SEGMENT_STOP:
// These are not used on iOS.
break;
}

View File

@ -85,4 +85,6 @@ public enum ReactMarkerConstants {
CREATE_MC_MODULE_END,
CREATE_MC_MODULE_GET_METADATA_START,
CREATE_MC_MODULE_GET_METADATA_END,
REGISTER_JS_SEGMENT_START,
REGISTER_JS_SEGMENT_STOP,
}

View File

@ -53,6 +53,12 @@ void JReactMarker::logPerfMarker(const ReactMarker::ReactMarkerId markerId, cons
case ReactMarker::NATIVE_MODULE_SETUP_STOP:
JReactMarker::logMarker("NATIVE_MODULE_SETUP_END", tag);
break;
case ReactMarker::REGISTER_JS_SEGMENT_START:
JReactMarker::logMarker("REGISTER_JS_SEGMENT_START", tag);
break;
case ReactMarker::REGISTER_JS_SEGMENT_STOP:
JReactMarker::logMarker("REGISTER_JS_SEGMENT_STOP", tag);
break;
case ReactMarker::NATIVE_REQUIRE_START:
case ReactMarker::NATIVE_REQUIRE_STOP:
// These are not used on Android.

View File

@ -23,6 +23,8 @@ enum ReactMarkerId {
JS_BUNDLE_STRING_CONVERT_STOP,
NATIVE_MODULE_SETUP_START,
NATIVE_MODULE_SETUP_STOP,
REGISTER_JS_SEGMENT_START,
REGISTER_JS_SEGMENT_STOP
};
#ifdef __APPLE__