Open-source library · React Native
React Native Profile Convert CLI
Pull Hermes CPU profiles from an Android device and convert them for inspection in Chrome DevTools.
A command-line tool that streamlines React Native performance profiling on Android. It uses adb to pull a selected Hermes CPU profile, retrieves the matching JavaScript bundle and source map from Metro, and converts the profile into a Chrome-compatible format for performance analysis.
From device to DevTools
A repeatable path from Hermes profiling to analysis.
One command collects a React Native CPU profile from Android and converts it, so you can inspect it in Chrome DevTools without manual steps.
- 01
Profile on Android
Run the React Native app on an Android device or emulator and start a Sampling Profiler session from the Developer Menu.
- 02
Select and pull a profile
The CLI lists available .cpuprofile files for the app; choose one and the tool pulls it over adb.
- 03
Fetch matching resources
It downloads the app’s JavaScript bundle and source map from the local Metro bundler so the profile can be interpreted with source context.
- 04
Convert and inspect
The Hermes profile is transformed into a Chrome-compatible profile and saved to the output directory you specify.
Usage
Pass the app identifiers and output folder.
The package documents these required flags. The app name is used to retrieve its bundle and source map from Metro.
rnpc -p com.company.app -a com.company.app.debug -o ./output-p, --packageAndroid package name for the React Native app.-a, --appApp name used to download the bundle and source map.-o, --outputDirectory where the converted profile is saved.
Requirements
Designed around a local Android profiling setup.
- 01Node.js installed in the development environment
- 02Android Debug Bridge (adb) installed and available in PATH
- 03React Native Metro bundler running locally, typically at http://localhost:8081