Update systrace markers
Reviewed By: AaaChiuuu Differential Revision: D5707578 fbshipit-source-id: 90afc7c0c7dd66eda621f990ca3a11848adeb4e5
This commit is contained in:
parent
e9d7711847
commit
c68bb6a72c
|
@ -54,7 +54,7 @@ void Instance::loadApplication(std::unique_ptr<JSModulesUnbundle> unbundle,
|
||||||
std::unique_ptr<const JSBigString> string,
|
std::unique_ptr<const JSBigString> string,
|
||||||
std::string sourceURL) {
|
std::string sourceURL) {
|
||||||
callback_->incrementPendingJSCalls();
|
callback_->incrementPendingJSCalls();
|
||||||
SystraceSection s("reactbridge_xplat_loadApplication", "sourceURL",
|
SystraceSection s("Instance::loadApplication", "sourceURL",
|
||||||
sourceURL);
|
sourceURL);
|
||||||
nativeToJsBridge_->loadApplication(std::move(unbundle), std::move(string),
|
nativeToJsBridge_->loadApplication(std::move(unbundle), std::move(string),
|
||||||
std::move(sourceURL));
|
std::move(sourceURL));
|
||||||
|
@ -66,7 +66,7 @@ void Instance::loadApplicationSync(std::unique_ptr<JSModulesUnbundle> unbundle,
|
||||||
std::unique_lock<std::mutex> lock(m_syncMutex);
|
std::unique_lock<std::mutex> lock(m_syncMutex);
|
||||||
m_syncCV.wait(lock, [this] { return m_syncReady; });
|
m_syncCV.wait(lock, [this] { return m_syncReady; });
|
||||||
|
|
||||||
SystraceSection s("reactbridge_xplat_loadApplicationSync", "sourceURL",
|
SystraceSection s("Instance::loadApplicationSync", "sourceURL",
|
||||||
sourceURL);
|
sourceURL);
|
||||||
nativeToJsBridge_->loadApplicationSync(std::move(unbundle), std::move(string),
|
nativeToJsBridge_->loadApplicationSync(std::move(unbundle), std::move(string),
|
||||||
std::move(sourceURL));
|
std::move(sourceURL));
|
||||||
|
@ -74,7 +74,7 @@ void Instance::loadApplicationSync(std::unique_ptr<JSModulesUnbundle> unbundle,
|
||||||
|
|
||||||
void Instance::setSourceURL(std::string sourceURL) {
|
void Instance::setSourceURL(std::string sourceURL) {
|
||||||
callback_->incrementPendingJSCalls();
|
callback_->incrementPendingJSCalls();
|
||||||
SystraceSection s("reactbridge_xplat_setSourceURL", "sourceURL", sourceURL);
|
SystraceSection s("Instance::setSourceURL", "sourceURL", sourceURL);
|
||||||
|
|
||||||
nativeToJsBridge_->loadApplication(nullptr, nullptr, std::move(sourceURL));
|
nativeToJsBridge_->loadApplication(nullptr, nullptr, std::move(sourceURL));
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ void Instance::setSourceURL(std::string sourceURL) {
|
||||||
void Instance::loadScriptFromString(std::unique_ptr<const JSBigString> string,
|
void Instance::loadScriptFromString(std::unique_ptr<const JSBigString> string,
|
||||||
std::string sourceURL,
|
std::string sourceURL,
|
||||||
bool loadSynchronously) {
|
bool loadSynchronously) {
|
||||||
SystraceSection s("reactbridge_xplat_loadScriptFromString", "sourceURL",
|
SystraceSection s("Instance::loadScriptFromString", "sourceURL",
|
||||||
sourceURL);
|
sourceURL);
|
||||||
if (loadSynchronously) {
|
if (loadSynchronously) {
|
||||||
loadApplicationSync(nullptr, std::move(string), std::move(sourceURL));
|
loadApplicationSync(nullptr, std::move(string), std::move(sourceURL));
|
||||||
|
@ -123,7 +123,7 @@ void Instance::callJSFunction(std::string &&module, std::string &&method,
|
||||||
}
|
}
|
||||||
|
|
||||||
void Instance::callJSCallback(uint64_t callbackId, folly::dynamic &¶ms) {
|
void Instance::callJSCallback(uint64_t callbackId, folly::dynamic &¶ms) {
|
||||||
SystraceSection s("<callback>");
|
SystraceSection s("Instance::callJSCallback");
|
||||||
callback_->incrementPendingJSCalls();
|
callback_->incrementPendingJSCalls();
|
||||||
nativeToJsBridge_->invokeCallback((double)callbackId, std::move(params));
|
nativeToJsBridge_->invokeCallback((double)callbackId, std::move(params));
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ std::vector<std::string> ModuleRegistry::moduleNames() {
|
||||||
}
|
}
|
||||||
|
|
||||||
folly::Optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name) {
|
folly::Optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name) {
|
||||||
SystraceSection s("getConfig", "module", name);
|
SystraceSection s("ModuleRegistry::getConfig", "module", name);
|
||||||
|
|
||||||
// Initialize modulesByName_
|
// Initialize modulesByName_
|
||||||
if (modulesByName_.empty() && !modules_.empty()) {
|
if (modulesByName_.empty() && !modules_.empty()) {
|
||||||
|
|
Loading…
Reference in New Issue