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 20, 2024
1 parent aa22b2f commit 9477980
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 9477980

Please sign in to comment.