From 9477980f8c1863f6b517149588417d5856a6eb27 Mon Sep 17 00:00:00 2001 From: Ldoppea Date: Tue, 26 Nov 2024 16:51:19 +0100 Subject: [PATCH] feat: Patch rn-performance-flipper-reporter to handle custom categories By default, `react-native-performance-flipper-reporter` does not support custom measurement categories This commit patches `react-native-performance-flipper-reporter` so it will display as many categories as provided to the `rnperformances.measure()` method calls --- ...-native-performance-flipper-reporter+5.0.0.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/react-native-performance-flipper-reporter+5.0.0.patch diff --git a/patches/react-native-performance-flipper-reporter+5.0.0.patch b/patches/react-native-performance-flipper-reporter+5.0.0.patch new file mode 100644 index 000000000..8ba70e9e7 --- /dev/null +++ b/patches/react-native-performance-flipper-reporter+5.0.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/react-native-performance-flipper-reporter/src/index.js b/node_modules/react-native-performance-flipper-reporter/src/index.js +index e99d526..bf1f6f1 100644 +--- a/node_modules/react-native-performance-flipper-reporter/src/index.js ++++ b/node_modules/react-native-performance-flipper-reporter/src/index.js +@@ -163,7 +163,7 @@ export function setupDefaultFlipperReporter() { + name: entry.name, + startTime: entry.startTime, + duration: entry.duration, +- category: 'App', ++ category: entry.detail?.category || 'App', + })) + ); + },