-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
krystofwoldrich 43d96af
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich c3f4157
WIP! Add Profiling Integration Interface
krystofwoldrich 03e054f
Add convertToSentryProfile
krystofwoldrich 1b84f7b
Add test for convert hermes to sentry profile
krystofwoldrich 5a0dac7
Merge branch 'main' into kw-profiling
krystofwoldrich 5ee59f1
Update vscode shared launch options
krystofwoldrich eafa576
!WIP JS profiling iOS
krystofwoldrich 1240f05
Large clean up and profiles sample rate
krystofwoldrich 0cf7665
Fix clean-ios
krystofwoldrich d11e846
Set SENTRY_PROFILING_ENABLED using env when installing RNSentry pod
krystofwoldrich 38d31bf
Remove unused user defined xcode settings
krystofwoldrich 3baae8a
Update Android profiling to use Hermes Profiler directly
krystofwoldrich a7ae896
Merge branch 'main' into kw-profiling
krystofwoldrich f7d55f6
Remove profiling test buttons and NATIVE tmp export
krystofwoldrich 8d9613d
Remove rn sentry package unused changes
krystofwoldrich 1cee74e
Use profiles sample rate to add profiling integration
krystofwoldrich f44b1a6
Add profiling integration tests
krystofwoldrich 19679d7
Fix mocks paths
krystofwoldrich 2e27a20
Add yalc add javascript
krystofwoldrich c8458cb
Add integrations test and use profiling types and cache from js sdk
krystofwoldrich 89182dc
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich 87bf20d
Close buffered reader
krystofwoldrich 11ab737
Remove compiler flag and use dynamic flag based on hermes.h
krystofwoldrich 918eef0
Add clear current profile timeout
krystofwoldrich 49de5d2
Use try with resource for profile file read buffer
krystofwoldrich a47c012
Use plural profilesSampleRate
krystofwoldrich df586fe
Refactor convert hermes profiles to smaller functions and add js docs…
krystofwoldrich 9a19971
hermesStackFrameIdToSentryFrameIdMap to ensure correct sentry frame id
krystofwoldrich bb2ff5d
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich 7e45cc9
Update iOS Sentry Profiling disabled error message
krystofwoldrich 65155ad
Correctly name anonymous function during Hermes Sentry Profile conver…
krystofwoldrich b44830c
Add debug raw profile file log
krystofwoldrich 0c47065
Add profiling changelog
krystofwoldrich a4b7cee
Update changelog
krystofwoldrich bfe91bb
Add log when hermes stack id not found in the map when mapping to sen…
krystofwoldrich f56dac0
Remove bundle file name regex to speed up the profile conversion
krystofwoldrich 0eb553e
Update to JS SDK 7.57.0-beta.0
krystofwoldrich 1e55aaf
Fix lint
krystofwoldrich caa12e5
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich d90eb10
Add remove over duration samples tests
krystofwoldrich cc6765c
Merge branch 'main' into kw-profiling
krystofwoldrich ffe4aab
Remove debugEnabled helper var
krystofwoldrich 91cb036
Delete profile file after reading it
krystofwoldrich c14d4a7
Fix ms to ns conversion
krystofwoldrich d636449
Delete profile file in debug and catch thrown errors during delete
krystofwoldrich 80e6fac
Merge branch 'main' into kw-profiling
krystofwoldrich 81889c6
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich a71b774
fix changelog
krystofwoldrich 333b1e7
Merge remote-tracking branch 'origin/main' into kw-profiling
krystofwoldrich 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ Sentry.init({ | |
| dsn: SENTRY_INTERNAL_DSN, | ||
| debug: true, | ||
| beforeSend: (event: Sentry.Event) => { | ||
| console.log('Event beforeSend:', event); | ||
| console.log('Event beforeSend:', event.event_id); | ||
| return event; | ||
| }, | ||
| // This will be called with a boolean `didCallNativeInit` when the native SDK has been contacted. | ||
|
|
@@ -85,6 +85,9 @@ Sentry.init({ | |
| // otherwise they will not work. | ||
| // release: '[email protected]+1', | ||
| // dist: `1`, | ||
| _experiments: { | ||
| profilesSampleRate: 1, | ||
| }, | ||
| }); | ||
|
|
||
| const Stack = createStackNavigator(); | ||
|
|
||
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.