mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
remove getAllPerformanceCounters() function
Reviewed By: fkgozali Differential Revision: D4626085 fbshipit-source-id: f07f5a72791176f075d3ce450af4c7ae4cd6fa5c
This commit is contained in:
parent
bd4b5dedc2
commit
6b738d1b2e
@ -12,8 +12,6 @@ package com.facebook.react.bridge;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@ -28,10 +26,6 @@ import com.facebook.react.bridge.queue.MessageQueueThread;
|
|||||||
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
|
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
|
||||||
import com.facebook.react.common.LifecycleState;
|
import com.facebook.react.common.LifecycleState;
|
||||||
|
|
||||||
import static com.facebook.react.common.LifecycleState.BEFORE_CREATE;
|
|
||||||
import static com.facebook.react.common.LifecycleState.BEFORE_RESUME;
|
|
||||||
import static com.facebook.react.common.LifecycleState.RESUMED;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract ContextWrapper for Android application or activity {@link Context} and
|
* Abstract ContextWrapper for Android application or activity {@link Context} and
|
||||||
* {@link CatalystInstance}
|
* {@link CatalystInstance}
|
||||||
@ -180,20 +174,6 @@ public class ReactContext extends ContextWrapper {
|
|||||||
mLifecycleEventListeners.remove(listener);
|
mLifecycleEventListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Map<String,Double>> getAllPerformanceCounters() {
|
|
||||||
Map<String, Map<String,Double>> totalPerfMap =
|
|
||||||
new HashMap<>();
|
|
||||||
if (mCatalystInstance != null) {
|
|
||||||
for (NativeModule nativeModule : mCatalystInstance.getNativeModules()) {
|
|
||||||
if (nativeModule instanceof PerformanceCounter) {
|
|
||||||
PerformanceCounter perfCounterModule = (PerformanceCounter) nativeModule;
|
|
||||||
totalPerfMap.put(nativeModule.getName(), perfCounterModule.getPerformanceCounters());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return totalPerfMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addActivityEventListener(ActivityEventListener listener) {
|
public void addActivityEventListener(ActivityEventListener listener) {
|
||||||
mActivityEventListeners.add(listener);
|
mActivityEventListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user