getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 338 forks source link

Refactor and test RNSentryModuleImpl.fetchNativeDeviceContexts #4253

Closed antonis closed 1 week ago

antonis commented 2 weeks ago

:loudspeaker: Type of change

:scroll: Description

Refactors RNSentryModuleImpl.fetchNativeDeviceContexts and adds tests

⚠️ Depends on: https://github.com/getsentry/sentry-react-native/pull/4124

:bulb: Motivation and Context

See https://github.com/getsentry/sentry-react-native/pull/4124/files#r1832593973

:green_heart: How did you test it?

CI, Manual testing

:pencil: Checklist

:crystal_ball: Next steps

skip-changelog

github-actions[bot] commented 2 weeks ago

Android (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 379.18 ms 395.60 ms 16.42 ms
Size 7.15 MiB 8.35 MiB 1.20 MiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 409.50 ms 462.68 ms 53.18 ms
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 415.54 ms 461.00 ms 45.46 ms
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 397.49 ms 454.02 ms 56.53 ms
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 478.18 ms 564.25 ms 86.07 ms
168e871e35b1ab53afd3bca384e6263230e71565+dirty 508.96 ms 599.09 ms 90.13 ms
c84e45774174acc866049288ee64223f82c5dcd5+dirty 395.52 ms 432.24 ms 36.72 ms
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 369.36 ms 405.27 ms 35.92 ms
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 434.98 ms 463.36 ms 28.38 ms

App size

Revision Plain With Sentry Diff
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 7.15 MiB 8.35 MiB 1.20 MiB
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 7.15 MiB 8.35 MiB 1.20 MiB
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 7.15 MiB 8.35 MiB 1.20 MiB
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 7.15 MiB 8.35 MiB 1.20 MiB
168e871e35b1ab53afd3bca384e6263230e71565+dirty 7.15 MiB 8.35 MiB 1.20 MiB
c84e45774174acc866049288ee64223f82c5dcd5+dirty 7.15 MiB 8.35 MiB 1.20 MiB
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 7.15 MiB 8.39 MiB 1.24 MiB
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 7.15 MiB 8.35 MiB 1.20 MiB
github-actions[bot] commented 2 weeks ago

iOS (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1222.98 ms 1211.94 ms -11.04 ms
Size 2.36 MiB 3.10 MiB 752.10 KiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 1217.18 ms 1220.83 ms 3.65 ms
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 1212.48 ms 1229.21 ms 16.73 ms
c84e45774174acc866049288ee64223f82c5dcd5+dirty 1218.30 ms 1224.08 ms 5.78 ms
168e871e35b1ab53afd3bca384e6263230e71565+dirty 1205.87 ms 1221.37 ms 15.50 ms
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 1211.82 ms 1220.43 ms 8.61 ms
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 1236.80 ms 1238.87 ms 2.08 ms
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 1216.04 ms 1220.39 ms 4.35 ms
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 1238.96 ms 1243.39 ms 4.43 ms

App size

Revision Plain With Sentry Diff
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 2.36 MiB 3.10 MiB 753.14 KiB
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 2.36 MiB 3.10 MiB 752.44 KiB
c84e45774174acc866049288ee64223f82c5dcd5+dirty 2.36 MiB 3.10 MiB 751.68 KiB
168e871e35b1ab53afd3bca384e6263230e71565+dirty 2.36 MiB 3.08 MiB 736.99 KiB
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 2.36 MiB 3.08 MiB 737.39 KiB
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 2.36 MiB 3.10 MiB 753.19 KiB
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 2.36 MiB 3.08 MiB 737.22 KiB
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 2.36 MiB 3.15 MiB 802.94 KiB
github-actions[bot] commented 2 weeks ago

iOS (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1224.00 ms 1233.92 ms 9.92 ms
Size 2.92 MiB 3.66 MiB 756.41 KiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 1237.70 ms 1239.14 ms 1.44 ms
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 1238.33 ms 1237.33 ms -1.01 ms
c84e45774174acc866049288ee64223f82c5dcd5+dirty 1229.50 ms 1226.76 ms -2.74 ms
168e871e35b1ab53afd3bca384e6263230e71565+dirty 1234.31 ms 1227.67 ms -6.64 ms
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 1237.08 ms 1232.16 ms -4.92 ms
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 1225.21 ms 1230.33 ms 5.12 ms
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 1234.25 ms 1234.78 ms 0.53 ms
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 1239.42 ms 1242.14 ms 2.73 ms

App size

Revision Plain With Sentry Diff
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1+dirty 2.92 MiB 3.66 MiB 758.41 KiB
093a11fb8a22ca6aa45a005cff3a25625f96da6f+dirty 2.92 MiB 3.66 MiB 757.73 KiB
c84e45774174acc866049288ee64223f82c5dcd5+dirty 2.92 MiB 3.66 MiB 756.01 KiB
168e871e35b1ab53afd3bca384e6263230e71565+dirty 2.92 MiB 3.64 MiB 742.68 KiB
9cee3c7e0f34aaf4847312ab42fb489abad895d9+dirty 2.92 MiB 3.64 MiB 743.04 KiB
e045c616b5a5624af61e91d99806c8840f8d89f3+dirty 2.92 MiB 3.66 MiB 758.40 KiB
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5+dirty 2.92 MiB 3.64 MiB 743.07 KiB
e62bf3068fb407de9e22bb33856575a3b18eb5b2+dirty 2.92 MiB 3.71 MiB 808.09 KiB
github-actions[bot] commented 1 week ago

Android (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 506.38 ms 501.06 ms -5.32 ms
Size 17.74 MiB 20.08 MiB 2.34 MiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
168e871e35b1ab53afd3bca384e6263230e71565 471.56 ms 451.59 ms -19.97 ms
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1 488.43 ms 500.04 ms 11.62 ms
e045c616b5a5624af61e91d99806c8840f8d89f3 395.70 ms 386.29 ms -9.41 ms
093a11fb8a22ca6aa45a005cff3a25625f96da6f 471.67 ms 487.81 ms 16.15 ms
9cee3c7e0f34aaf4847312ab42fb489abad895d9 509.72 ms 513.58 ms 3.86 ms
e62bf3068fb407de9e22bb33856575a3b18eb5b2 481.92 ms 471.48 ms -10.44 ms
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5 420.78 ms 512.84 ms 92.07 ms
c84e45774174acc866049288ee64223f82c5dcd5 490.41 ms 489.28 ms -1.13 ms

App size

Revision Plain With Sentry Diff
168e871e35b1ab53afd3bca384e6263230e71565 17.74 MiB 20.08 MiB 2.34 MiB
f7ad13bd3e7bdd526442fa4549c61a2b1e55d7d1 17.74 MiB 20.07 MiB 2.34 MiB
e045c616b5a5624af61e91d99806c8840f8d89f3 17.74 MiB 20.07 MiB 2.34 MiB
093a11fb8a22ca6aa45a005cff3a25625f96da6f 17.74 MiB 20.07 MiB 2.34 MiB
9cee3c7e0f34aaf4847312ab42fb489abad895d9 17.74 MiB 20.08 MiB 2.34 MiB
e62bf3068fb407de9e22bb33856575a3b18eb5b2 17.73 MiB 20.11 MiB 2.38 MiB
17fc2f74058ab1a6949b9b9da5ef69eec30a50d5 17.74 MiB 20.08 MiB 2.34 MiB
c84e45774174acc866049288ee64223f82c5dcd5 17.74 MiB 20.08 MiB 2.34 MiB