Implemented command to download the Hermes Sampling Profiler to a local machine #2
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
Solves Add a command to download Hermes profile #1
Add
packages/cli/src/commands/profile
: a folder for Hermes Sampling Profile related commandsFile
packages/cli/src/commands/profile/index.ts
: exporting the default commandprofile-hermes [destinationDir] --fileName [string]
File
packages/cli/src/commands/profile/downloadProfile.ts
: implement the functions that help with the above command 👆Command added in the file
packages/cli/src/commands/index.ts
: add the profile command in the list ofprojectCommands
Test Plan:
I first followed this guide on how to test changes Testing changes.
After that, the usage of the command is:
profile-hermes [destinationDir] --fileName [string]
with appropriate inputsdestinationDir
: is optional, provided it with the directory where users want to pull the profile to (if not present, pull to the current React Native root directory)--fileName [string]
an option to specify which profile users want to pull (if not present, pull the latest profile)Make sure your emulator is running and adb is connected