-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add a command to download the Hermes Sampling Profiler to a local machine #1246
Merged
thymikee
merged 68 commits into
react-native-community:master
from
MLH-Fellowship:master
Sep 4, 2020
Merged
feat: add a command to download the Hermes Sampling Profiler to a local machine #1246
thymikee
merged 68 commits into
react-native-community:master
from
MLH-Fellowship:master
Sep 4, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implemented command to download the Hermes Sampling Profiler to a local machine
Integrated transformer tool into CLI
…eat/generate-source-map
Feat/generate source map
implemented @todo get only the .cpuprofile from cache/ add a few verbose logs edited profile-hermes.md
add the usage to commands.md delete the profile-hermes.md
This was referenced Mar 13, 2021
Closed
Closed
Closed
Closed
Closed
Closed
Closed
is there no Would really be nice to have this included:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR implements a new command to download the Hermes Sampling Profiler to a local machine.
This command is built as part of the goal to visualize the performance of JavaScript running on Hermes in a React Native app.
@saphal1998 and I worked on this under @axemclion and @jevakallio guidance.
1. Purpose:
2. Usage:
destinationDir
is optional; if provided, pull the file to that directoryOptions
--filename [string]
File name of the profile to be downloaded, ex. sampling-profiler-trace8593107139682635366.cpuprofile
--verbose
Lists commands and steps that are run internally to pull the file from Android device
--raw
Pulls the original Hermes tracing profile without any transformation
--sourcemap-path [string]
The local path to your source map file if you generated it manually, ex.
/tmp/sourcemap.json
--generate-sourcemap
Generate the JS bundle and source map in
os.tmpdir()
Notes on source map
If you are planning on building a debug APK, that will run without the packager, by invoking
./gradlew assembleDebug
you can simply setbundleInDebug: true
in your app/build.gradle file, inside theproject.ext.react
map.Test Plan:
yarn
yarn lint
react-native profile-hermes
as per instruction aboveExample output of running the command