Skip to content

Commit

Permalink
feat: Patch rn-performance-flipper-reporter to handle custom categories
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ldoppea committed Dec 19, 2024
1 parent 58ec193 commit 46a63ec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/react-native-performance-flipper-reporter+5.0.0.patch
Original file line number Diff line number Diff line change
@@ -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',
}))
);
},

0 comments on commit 46a63ec

Please sign in to comment.