Skip to content

Enums use its name instead of non exhaustive switches #1506

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 2 commits into from
Jun 5, 2023

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Jun 5, 2023

📜 Description

Enums will use its name instead of non-exhaustive switches
Since Dart 2.15 we can use the name if they match 1 by 1.

💡 Motivation and Context

#1503 and #1504
Follow up by @abdelrahmanelmarakby thanks :)

💚 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
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.63 🎉

Comparison is base (7e30648) 88.65% compared to head (b056f00) 90.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1506      +/-   ##
==========================================
+ Coverage   88.65%   90.28%   +1.63%     
==========================================
  Files         142      181      +39     
  Lines        4389     5764    +1375     
==========================================
+ Hits         3891     5204    +1313     
- Misses        498      560      +62     
Impacted Files Coverage Δ
flutter/lib/src/renderer/renderer.dart 100.00% <ø> (ø)
dart/lib/src/protocol/sentry_device.dart 100.00% <100.00%> (ø)
dart/lib/src/protocol/sentry_transaction.dart 90.90% <100.00%> (ø)
...nt_processor/flutter_enricher_event_processor.dart 94.18% <100.00%> (ø)
...rc/event_processor/screenshot_event_processor.dart 79.48% <100.00%> (ø)
flutter/lib/src/widgets_binding_observer.dart 98.03% <100.00%> (ø)

... and 36 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 310.65 ms 372.41 ms 61.76 ms
Size 6.16 MiB 7.13 MiB 1001.30 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
21845e2 345.08 ms 382.82 ms 37.74 ms
f2db4ec 372.46 ms 469.72 ms 97.26 ms
68677de 364.41 ms 415.61 ms 51.20 ms
0db91cc 327.85 ms 387.31 ms 59.46 ms
86d4841 286.35 ms 372.43 ms 86.08 ms
dd1f7d2 338.54 ms 387.10 ms 48.56 ms
f1314d5 313.89 ms 372.10 ms 58.21 ms
24f71aa 358.49 ms 455.90 ms 97.41 ms
2f8f173 323.31 ms 373.29 ms 49.97 ms
f96ca24 316.08 ms 388.22 ms 72.14 ms

App size

Revision Plain With Sentry Diff
21845e2 5.94 MiB 6.92 MiB 1003.77 KiB
f2db4ec 6.06 MiB 7.03 MiB 990.27 KiB
68677de 6.06 MiB 7.10 MiB 1.04 MiB
0db91cc 5.94 MiB 6.95 MiB 1.01 MiB
86d4841 6.15 MiB 7.13 MiB 1000.49 KiB
dd1f7d2 6.06 MiB 7.10 MiB 1.04 MiB
f1314d5 6.06 MiB 7.10 MiB 1.04 MiB
24f71aa 6.06 MiB 7.03 MiB 990.30 KiB
2f8f173 5.94 MiB 6.95 MiB 1.01 MiB
f96ca24 6.06 MiB 7.10 MiB 1.04 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1230.81 ms 1243.29 ms 12.47 ms
Size 8.29 MiB 9.36 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
613760b 1263.10 ms 1277.27 ms 14.16 ms
11fb408 1256.14 ms 1283.51 ms 27.37 ms
a49594a 1284.83 ms 1313.29 ms 28.45 ms
90db9ff 1277.18 ms 1283.69 ms 6.51 ms
c73ab67 1267.73 ms 1279.36 ms 11.63 ms
322aa66 1251.68 ms 1275.52 ms 23.84 ms
6491ebd 1231.41 ms 1245.35 ms 13.94 ms
b728df4 1287.43 ms 1293.94 ms 6.51 ms
d301b11 1260.61 ms 1272.06 ms 11.45 ms
8cb6557 1265.14 ms 1266.08 ms 0.94 ms

App size

Revision Plain With Sentry Diff
613760b 8.15 MiB 9.13 MiB 1000.46 KiB
11fb408 8.10 MiB 9.08 MiB 1004.36 KiB
a49594a 8.16 MiB 9.16 MiB 1.00 MiB
90db9ff 8.10 MiB 9.08 MiB 1004.27 KiB
c73ab67 8.29 MiB 9.36 MiB 1.07 MiB
322aa66 8.15 MiB 9.12 MiB 992.53 KiB
6491ebd 8.29 MiB 9.36 MiB 1.07 MiB
b728df4 8.15 MiB 9.15 MiB 1020.72 KiB
d301b11 8.10 MiB 9.07 MiB 1000.82 KiB
8cb6557 8.10 MiB 9.18 MiB 1.08 MiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants