-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat(profiling): Add Hermes JS Profiling (experimental) #3057
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
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
5d55591
Add profiling start and stop to RNSentry Android module
43d96af
Merge remote-tracking branch 'origin/main' into kw-profiling
c3f4157
WIP! Add Profiling Integration Interface
03e054f
Add convertToSentryProfile
1b84f7b
Add test for convert hermes to sentry profile
5a0dac7
Merge branch 'main' into kw-profiling
5ee59f1
Update vscode shared launch options
eafa576
!WIP JS profiling iOS
1240f05
Large clean up and profiles sample rate
0cf7665
Fix clean-ios
d11e846
Set SENTRY_PROFILING_ENABLED using env when installing RNSentry pod
38d31bf
Remove unused user defined xcode settings
3baae8a
Update Android profiling to use Hermes Profiler directly
a7ae896
Merge branch 'main' into kw-profiling
f7d55f6
Remove profiling test buttons and NATIVE tmp export
8d9613d
Remove rn sentry package unused changes
1cee74e
Use profiles sample rate to add profiling integration
f44b1a6
Add profiling integration tests
19679d7
Fix mocks paths
2e27a20
Add yalc add javascript
c8458cb
Add integrations test and use profiling types and cache from js sdk
89182dc
Merge remote-tracking branch 'origin/main' into kw-profiling
87bf20d
Close buffered reader
11ab737
Remove compiler flag and use dynamic flag based on hermes.h
918eef0
Add clear current profile timeout
49de5d2
Use try with resource for profile file read buffer
a47c012
Use plural profilesSampleRate
df586fe
Refactor convert hermes profiles to smaller functions and add js docs…
9a19971
hermesStackFrameIdToSentryFrameIdMap to ensure correct sentry frame id
bb2ff5d
Merge remote-tracking branch 'origin/main' into kw-profiling
7e45cc9
Update iOS Sentry Profiling disabled error message
65155ad
Correctly name anonymous function during Hermes Sentry Profile conver…
b44830c
Add debug raw profile file log
0c47065
Add profiling changelog
a4b7cee
Update changelog
bfe91bb
Add log when hermes stack id not found in the map when mapping to sen…
f56dac0
Remove bundle file name regex to speed up the profile conversion
0eb553e
Update to JS SDK 7.57.0-beta.0
1e55aaf
Fix lint
caa12e5
Merge remote-tracking branch 'origin/main' into kw-profiling
d90eb10
Add remove over duration samples tests
cc6765c
Merge branch 'main' into kw-profiling
ffe4aab
Remove debugEnabled helper var
91cb036
Delete profile file after reading it
c14d4a7
Fix ms to ns conversion
d636449
Delete profile file in debug and catch thrown errors during delete
80e6fac
Merge branch 'main' into kw-profiling
81889c6
Merge remote-tracking branch 'origin/main' into kw-profiling
a71b774
fix changelog
333b1e7
Merge remote-tracking branch 'origin/main' into kw-profiling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
8 changes: 7 additions & 1 deletion
8
...new-architecture/android/app/src/main/java/com/samplenewarchitecture/MainApplication.java
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| const { writeFileSync } = require('fs'); | ||
|
|
||
| const transformer = require('hermes-profile-transformer').default; | ||
|
|
||
| const hermesCpuProfilePath = 'iOS_release_profile.json'; | ||
| const sourceMapPath = './main.jsbundle.map'; | ||
| const sourceMapBundleFileName = 'main.jsbundle'; | ||
|
|
||
| transformer( | ||
| // profile path is required | ||
| hermesCpuProfilePath, | ||
| // source maps are optional | ||
| sourceMapPath, | ||
| sourceMapBundleFileName | ||
| ) | ||
| .then(events => { | ||
| // write converted trace to a file | ||
| return writeFileSync( | ||
| './chrome-supported.json', | ||
| JSON.stringify(events, null, 2), | ||
| 'utf-8' | ||
| ); | ||
| }) | ||
| .catch(err => { | ||
| console.log(err); | ||
| }); |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.