Skip to content
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(profiling): Add Hermes JS Profiling (experimental) #3057

Merged
merged 50 commits into from
Jul 27, 2023

Conversation

krystofwoldrich
Copy link
Member

@krystofwoldrich krystofwoldrich commented May 9, 2023

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

💡 Motivation and Context

Related to: #2668
Doesn't close the issue as this is only the first step. Native profiling will follow.

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 333b1e7

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1250.36 ms 1252.64 ms 2.28 ms
Size 2.36 MiB 2.86 MiB 511.86 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d197b5c+dirty 1217.61 ms 1242.66 ms 25.05 ms
e73f4ed+dirty 1243.27 ms 1244.52 ms 1.25 ms
e2b64fe+dirty 1232.22 ms 1255.20 ms 22.98 ms
8900e1a+dirty 1210.27 ms 1218.66 ms 8.39 ms
9a3ca65+dirty 1247.06 ms 1274.58 ms 27.52 ms
34aba08+dirty 1276.78 ms 1308.52 ms 31.74 ms
52a8031+dirty 1280.88 ms 1289.78 ms 8.90 ms
15c80ab+dirty 1223.74 ms 1228.96 ms 5.22 ms
70caa60+dirty 1218.27 ms 1230.30 ms 12.03 ms
86d6d2c+dirty 1267.55 ms 1286.21 ms 18.66 ms

App size

Revision Plain With Sentry Diff
d197b5c+dirty 2.36 MiB 2.82 MiB 462.86 KiB
e73f4ed+dirty 2.36 MiB 2.82 MiB 469.44 KiB
e2b64fe+dirty 2.36 MiB 2.85 MiB 495.80 KiB
8900e1a+dirty 2.36 MiB 2.83 MiB 479.25 KiB
9a3ca65+dirty 2.36 MiB 2.82 MiB 462.89 KiB
34aba08+dirty 2.36 MiB 2.85 MiB 495.32 KiB
52a8031+dirty 2.36 MiB 2.82 MiB 469.44 KiB
15c80ab+dirty 2.36 MiB 2.83 MiB 474.49 KiB
70caa60+dirty 2.36 MiB 2.83 MiB 479.27 KiB
86d6d2c+dirty 2.36 MiB 2.82 MiB 462.82 KiB

Previous results on branch: kw-profiling

Startup times

Revision Plain With Sentry Diff
18c3f2a+dirty 1229.55 ms 1247.08 ms 17.53 ms

App size

Revision Plain With Sentry Diff
18c3f2a+dirty 2.36 MiB 2.85 MiB 503.09 KiB

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1257.86 ms 1261.16 ms 3.30 ms
Size 2.92 MiB 3.42 MiB 515.72 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d197b5c+dirty 1234.80 ms 1249.20 ms 14.40 ms
e73f4ed+dirty 1282.90 ms 1309.30 ms 26.40 ms
e2b64fe+dirty 1285.78 ms 1297.56 ms 11.78 ms
8900e1a+dirty 1268.36 ms 1273.04 ms 4.68 ms
9a3ca65+dirty 1276.40 ms 1279.14 ms 2.74 ms
34aba08+dirty 1268.58 ms 1276.80 ms 8.22 ms
52a8031+dirty 1255.96 ms 1273.00 ms 17.04 ms
15c80ab+dirty 1248.41 ms 1251.24 ms 2.83 ms
70caa60+dirty 1279.08 ms 1281.54 ms 2.46 ms
86d6d2c+dirty 1291.62 ms 1296.80 ms 5.18 ms

App size

Revision Plain With Sentry Diff
d197b5c+dirty 2.92 MiB 3.37 MiB 464.41 KiB
e73f4ed+dirty 2.92 MiB 3.38 MiB 475.71 KiB
e2b64fe+dirty 2.92 MiB 3.41 MiB 499.97 KiB
8900e1a+dirty 2.92 MiB 3.39 MiB 485.96 KiB
9a3ca65+dirty 2.92 MiB 3.37 MiB 464.32 KiB
34aba08+dirty 2.92 MiB 3.41 MiB 499.03 KiB
52a8031+dirty 2.92 MiB 3.38 MiB 475.71 KiB
15c80ab+dirty 2.92 MiB 3.39 MiB 481.56 KiB
70caa60+dirty 2.92 MiB 3.39 MiB 486.04 KiB
86d6d2c+dirty 2.92 MiB 3.37 MiB 464.31 KiB

Previous results on branch: kw-profiling

Startup times

Revision Plain With Sentry Diff
18c3f2a+dirty 1253.90 ms 1273.44 ms 19.54 ms

App size

Revision Plain With Sentry Diff
18c3f2a+dirty 2.92 MiB 3.41 MiB 506.63 KiB

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 264.14 ms 304.04 ms 39.90 ms
Size 7.15 MiB 8.09 MiB 970.01 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d197b5c+dirty 258.75 ms 313.61 ms 54.86 ms
e73f4ed+dirty 262.98 ms 311.02 ms 48.04 ms
e2b64fe+dirty 258.82 ms 304.26 ms 45.44 ms
8900e1a+dirty 371.40 ms 377.70 ms 6.31 ms
9a3ca65+dirty 344.96 ms 358.92 ms 13.96 ms
34aba08+dirty 331.79 ms 376.69 ms 44.91 ms
52a8031+dirty 330.72 ms 358.76 ms 28.03 ms
15c80ab+dirty 276.38 ms 327.54 ms 51.17 ms
70caa60+dirty 308.83 ms 393.06 ms 84.23 ms
86d6d2c+dirty 267.21 ms 325.24 ms 58.04 ms

App size

Revision Plain With Sentry Diff
d197b5c+dirty 7.15 MiB 8.09 MiB 962.72 KiB
e73f4ed+dirty 7.15 MiB 8.09 MiB 965.94 KiB
e2b64fe+dirty 7.15 MiB 8.07 MiB 947.16 KiB
8900e1a+dirty 7.15 MiB 8.03 MiB 901.79 KiB
9a3ca65+dirty 7.15 MiB 8.09 MiB 962.83 KiB
34aba08+dirty 7.15 MiB 8.07 MiB 946.13 KiB
52a8031+dirty 7.15 MiB 8.09 MiB 965.95 KiB
15c80ab+dirty 7.15 MiB 8.09 MiB 966.13 KiB
70caa60+dirty 7.15 MiB 8.03 MiB 901.79 KiB
86d6d2c+dirty 7.15 MiB 8.09 MiB 962.69 KiB

Previous results on branch: kw-profiling

Startup times

Revision Plain With Sentry Diff
18c3f2a+dirty 266.41 ms 324.10 ms 57.69 ms

App size

Revision Plain With Sentry Diff
18c3f2a+dirty 7.15 MiB 8.08 MiB 960.88 KiB

@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2023

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 334.19 ms 351.96 ms 17.77 ms
Size 17.73 MiB 19.82 MiB 2.09 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d197b5c+dirty 338.94 ms 354.87 ms 15.93 ms
e73f4ed+dirty 332.96 ms 354.33 ms 21.37 ms
34aba08 328.10 ms 342.84 ms 14.74 ms
8900e1a+dirty 430.68 ms 456.13 ms 25.44 ms
3853f43 329.68 ms 346.32 ms 16.64 ms
0db0c72 372.12 ms 386.00 ms 13.88 ms
9a3ca65+dirty 326.93 ms 330.14 ms 3.21 ms
52a8031+dirty 311.55 ms 321.37 ms 9.82 ms
15c80ab+dirty 336.27 ms 350.58 ms 14.31 ms
70caa60+dirty 299.00 ms 321.02 ms 22.02 ms

App size

Revision Plain With Sentry Diff
d197b5c+dirty 17.73 MiB 20.04 MiB 2.31 MiB
e73f4ed+dirty 17.73 MiB 20.04 MiB 2.31 MiB
34aba08 17.73 MiB 19.80 MiB 2.07 MiB
8900e1a+dirty 17.73 MiB 19.75 MiB 2.01 MiB
3853f43 17.73 MiB 19.81 MiB 2.08 MiB
0db0c72 17.73 MiB 19.75 MiB 2.02 MiB
9a3ca65+dirty 17.73 MiB 20.04 MiB 2.31 MiB
52a8031+dirty 17.73 MiB 20.04 MiB 2.31 MiB
15c80ab+dirty 17.73 MiB 20.04 MiB 2.31 MiB
70caa60+dirty 17.73 MiB 19.75 MiB 2.01 MiB

Previous results on branch: kw-profiling

Startup times

Revision Plain With Sentry Diff
18c3f2a 352.56 ms 374.00 ms 21.44 ms

App size

Revision Plain With Sentry Diff
18c3f2a 17.73 MiB 19.82 MiB 2.08 MiB

@marandaneto
Copy link
Contributor

@krystofwoldrich could some of the TS types live in/share with the JS SDK? it seels like some of them are duplicate/can be reused.

@krystofwoldrich
Copy link
Member Author

@marandaneto @JonasBa I've addressed the comments. The PR is ready for a final review.

@JonasBa
Copy link
Member

JonasBa commented Jun 29, 2023

@krystofwoldrich the PR looks good to me, only CI seems to be failing. I'l defer for the final approval to @marandaneto for the more native parts

@krystofwoldrich
Copy link
Member Author

@JonasBa Thanks. The CI just timed out, re-run should fix it.

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left 2 more comments otherwise LGTM.

@krystofwoldrich
Copy link
Member Author

Sentry backend stopped accepting Profile and Transaction in separate envelopes on 16th June. Because of the current implementation of sending envelopes on Android, we can send Transaction and Profile in one envelope. Android opens the envelope and repacks the envelope items. This will be solved by the new way of enriching events as then Android will blindly send the envelope without unpacking it.

@krystofwoldrich krystofwoldrich merged commit e4212f4 into main Jul 27, 2023
48 of 50 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-profiling branch July 27, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants