-
-
Notifications
You must be signed in to change notification settings - Fork 272
Use FFI/JNI for captureEnvelope
on iOS and Android
#3115
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3115 +/- ##
==========================================
+ Coverage 87.77% 87.79% +0.02%
==========================================
Files 291 103 -188
Lines 9952 4097 -5855
==========================================
- Hits 8735 3597 -5138
+ Misses 1217 500 -717 ☔ View full report in Codecov by Sentry. |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
73dca78 | 1246.65 ms | 1265.42 ms | 18.76 ms |
c8596a6 | 1234.11 ms | 1241.19 ms | 7.08 ms |
7cfee3b | 1260.90 ms | 1273.14 ms | 12.24 ms |
eca355d | 1238.39 ms | 1266.98 ms | 28.59 ms |
79f6b41 | 1269.33 ms | 1279.71 ms | 10.38 ms |
ec78888 | 1251.37 ms | 1269.40 ms | 18.04 ms |
2d34233 | 1258.19 ms | 1268.92 ms | 10.73 ms |
793f4dc | 1262.50 ms | 1282.35 ms | 19.85 ms |
4481076 | 1256.48 ms | 1266.64 ms | 10.17 ms |
93b7728 | 1247.23 ms | 1264.87 ms | 17.64 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
73dca78 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
c8596a6 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
7cfee3b | 20.70 MiB | 22.46 MiB | 1.75 MiB |
eca355d | 7.86 MiB | 9.44 MiB | 1.58 MiB |
79f6b41 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
ec78888 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
2d34233 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
793f4dc | 7.86 MiB | 9.44 MiB | 1.58 MiB |
4481076 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
93b7728 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: enh/ffi-jni-capture-envelope
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f61db9e | 1225.65 ms | 1228.74 ms | 3.10 ms |
4d265af | 1274.31 ms | 1284.55 ms | 10.24 ms |
d9df09c | 1271.86 ms | 1274.88 ms | 3.02 ms |
8243b86 | 1256.24 ms | 1268.31 ms | 12.06 ms |
5fa2e5f | 1233.29 ms | 1237.04 ms | 3.75 ms |
fcdc0a0 | 1270.39 ms | 1282.24 ms | 11.86 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f61db9e | 5.53 MiB | 5.97 MiB | 453.66 KiB |
4d265af | 7.86 MiB | 9.45 MiB | 1.59 MiB |
d9df09c | 5.53 MiB | 5.97 MiB | 454.13 KiB |
8243b86 | 7.86 MiB | 9.45 MiB | 1.59 MiB |
5fa2e5f | 7.86 MiB | 9.45 MiB | 1.59 MiB |
fcdc0a0 | 7.86 MiB | 9.45 MiB | 1.59 MiB |
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
c8596a6 | 474.00 ms | 492.96 ms | 18.96 ms |
73a3c38 | 478.18 ms | 526.62 ms | 48.44 ms |
0fb45d0 | 482.79 ms | 554.02 ms | 71.23 ms |
640ad0c | 466.00 ms | 552.67 ms | 86.67 ms |
765aa8b | 493.51 ms | 531.23 ms | 37.72 ms |
cc4e375 | 426.15 ms | 482.34 ms | 56.19 ms |
c1e775e | 482.36 ms | 608.98 ms | 126.62 ms |
2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
54acf91 | 487.24 ms | 529.60 ms | 42.36 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
c8596a6 | 6.54 MiB | 7.53 MiB | 1015.27 KiB |
73a3c38 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
0fb45d0 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
640ad0c | 6.54 MiB | 7.69 MiB | 1.15 MiB |
765aa8b | 6.54 MiB | 7.70 MiB | 1.16 MiB |
cc4e375 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
c1e775e | 6.54 MiB | 7.70 MiB | 1.17 MiB |
2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
54acf91 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
Previous results on branch: enh/ffi-jni-capture-envelope
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8243b86 | 480.34 ms | 499.35 ms | 19.01 ms |
f61db9e | 458.13 ms | 464.74 ms | 6.61 ms |
fcdc0a0 | 504.15 ms | 536.24 ms | 32.09 ms |
4d265af | 451.48 ms | 506.33 ms | 54.85 ms |
5fa2e5f | 508.60 ms | 556.53 ms | 47.93 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8243b86 | 6.54 MiB | 7.71 MiB | 1.17 MiB |
f61db9e | 13.93 MiB | 14.93 MiB | 1.00 MiB |
fcdc0a0 | 6.54 MiB | 7.71 MiB | 1.17 MiB |
4d265af | 6.54 MiB | 7.71 MiB | 1.17 MiB |
5fa2e5f | 6.54 MiB | 7.71 MiB | 1.17 MiB |
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Step towards #1444
💚 How did you test it?
It's currently hard to mock JNI/FFI calls so we'll be relying on integration tests and verifying that method channel calls are not made anymore for
captureEnvelope
Performance improvement is marginal but an improvement nonetheless
iOS:
FFI calls (26 samples):
Average ≈ 2 967.4 microseconds
Channel calls (25 samples):
Average ≈ 3 264.5 microseconds
Android:
JNI calls (33 samples):
Average ≈ 1 012.8 microseconds
Channel calls (32 samples):
Average ≈ 1 462.5 microseconds
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps
@sentry review