Open-source library · React Native
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
The package README describes a command-line workflow for collecting and converting React Native CPU profiles from Android, so developers can inspect the result using Chrome DevTools.
Run the React Native app on an Android device or emulator and start a Sampling Profiler session from the Developer Menu.
The CLI lists available .cpuprofile files for the app; choose one and the tool pulls it over adb.
It downloads the app’s JavaScript bundle and source map from the local Metro bundler so the profile can be interpreted with source context.
The Hermes profile is transformed into a Chrome-compatible profile and saved to the output directory you specify.
Usage
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, --package Android package name for the React Native app.-a, --app App name used to download the bundle and source map.-o, --output Directory where the converted profile is saved.Requirements