Skip to content

Commit c05448b

Browse files
Xin Chenfacebook-github-bot
authored andcommitted
Add Time Series History and Renderer for rendering time series chart (facebook#39480)
Summary: Pull Request resolved: facebook#39480 Changelog: [Internal] - Separate the time series data and renderer logic from performance monitor overlay so that it can be swapped later to C++ for cross-platform support. Reviewed By: rshest Differential Revision: D49321748 fbshipit-source-id: fbb781ef710b134130bfd80dada00748e73d5f24
1 parent 30b9b01 commit c05448b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/UiThreadUtil.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ public static void runOnUiThread(Runnable runnable, long delayInMs) {
5858
}
5959
sMainHandler.postDelayed(runnable, delayInMs);
6060
}
61+
62+
/** Removes the given {@code Runnable} on the UI thread. */
63+
public static void removeOnUiThread(Runnable runnable) {
64+
synchronized (UiThreadUtil.class) {
65+
if (sMainHandler == null) {
66+
sMainHandler = new Handler(Looper.getMainLooper());
67+
}
68+
}
69+
sMainHandler.removeCallbacks(runnable);
70+
}
6171
}

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/DevToolsReactPerfLogger.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ public int getAffectedLayoutNodesCount() {
126126
return getCounter(FABRIC_LAYOUT_AFFECTED_NODES);
127127
}
128128

129+
public long getAffectedLayoutNodesCountTime() {
130+
return getTimestamp(FABRIC_LAYOUT_AFFECTED_NODES);
131+
}
132+
129133
public long getBatchExecutionStart() {
130134
return getTimestamp(FABRIC_BATCH_EXECUTION_START);
131135
}

0 commit comments

Comments
 (0)