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

Wrapped methods return a Future instead of executing right away #1476

Merged
merged 4 commits into from
May 24, 2023

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented May 24, 2023

📜 Description

Wrapped methods return a Future instead of executing right away

💡 Motivation and Context

Follow up #1462 (comment)
I was calling the declared Future function in the return statement with the impression that I was returning the function, my bad.

💚 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 May 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 ⚠️

Comparison is base (f9d18f3) 90.22% compared to head (db4233d) 90.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1476      +/-   ##
==========================================
- Coverage   90.22%   90.18%   -0.04%     
==========================================
  Files         181      181              
  Lines        5798     5776      -22     
==========================================
- Hits         5231     5209      -22     
  Misses        567      567              
Impacted Files Coverage Δ
flutter/lib/src/sentry_asset_bundle.dart 94.30% <100.00%> (-0.23%) ⬇️
sqflite/lib/src/sentry_batch.dart 94.54% <100.00%> (-0.20%) ⬇️
sqflite/lib/src/sentry_database.dart 76.31% <100.00%> (-1.19%) ⬇️
sqflite/lib/src/sentry_database_executor.dart 97.39% <100.00%> (-0.23%) ⬇️
sqflite/lib/src/sentry_sqflite.dart 80.00% <100.00%> (-1.25%) ⬇️
...flite/lib/src/sentry_sqflite_database_factory.dart 72.22% <100.00%> (-1.47%) ⬇️

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

@marandaneto marandaneto marked this pull request as draft May 24, 2023 10:26
Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Looks good 🚀, now we right away return Future.

@github-actions
Copy link
Contributor

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 315.04 ms 367.51 ms 52.47 ms
Size 6.15 MiB 7.13 MiB 1000.49 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
691aa3b 370.43 ms 466.28 ms 95.85 ms
abcdba3 354.68 ms 399.04 ms 44.36 ms
22ed6cb 326.27 ms 393.00 ms 66.73 ms
457a85b 312.37 ms 376.67 ms 64.31 ms
9928a74 375.26 ms 456.30 ms 81.04 ms
eb1a7c1 332.98 ms 381.55 ms 48.57 ms
0a82a1e 321.02 ms 393.82 ms 72.80 ms
2331d89 352.45 ms 417.34 ms 64.89 ms
ed605cc 317.48 ms 374.24 ms 56.76 ms
6d317ea 303.46 ms 356.06 ms 52.60 ms

App size

Revision Plain With Sentry Diff
691aa3b 5.94 MiB 6.96 MiB 1.02 MiB
abcdba3 5.94 MiB 6.95 MiB 1.01 MiB
22ed6cb 6.06 MiB 7.03 MiB 993.37 KiB
457a85b 6.06 MiB 7.09 MiB 1.03 MiB
9928a74 5.94 MiB 6.96 MiB 1.02 MiB
eb1a7c1 5.94 MiB 6.92 MiB 1005.76 KiB
0a82a1e 6.15 MiB 7.11 MiB 981.82 KiB
2331d89 5.94 MiB 6.96 MiB 1.02 MiB
ed605cc 6.06 MiB 7.03 MiB 993.53 KiB
6d317ea 5.94 MiB 6.92 MiB 1001.74 KiB

@github-actions
Copy link
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1225.82 ms 1231.81 ms 5.99 ms
Size 8.29 MiB 9.36 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3f23617 1261.93 ms 1286.10 ms 24.17 ms
b98109e 1254.19 ms 1279.90 ms 25.71 ms
a1a1545 1270.85 ms 1289.82 ms 18.96 ms
2f8f173 1280.61 ms 1292.20 ms 11.59 ms
21845e2 1279.37 ms 1298.81 ms 19.45 ms
2d3b03d 1258.19 ms 1272.69 ms 14.50 ms
3ba8d7e 1224.14 ms 1226.12 ms 1.98 ms
f79eecf 1210.25 ms 1221.65 ms 11.40 ms
24f71aa 1267.47 ms 1272.00 ms 4.53 ms
322aa66 1251.68 ms 1275.52 ms 23.84 ms

App size

Revision Plain With Sentry Diff
3f23617 8.16 MiB 9.17 MiB 1.01 MiB
b98109e 8.10 MiB 9.17 MiB 1.08 MiB
a1a1545 8.16 MiB 9.17 MiB 1.01 MiB
2f8f173 8.15 MiB 9.13 MiB 1000.39 KiB
21845e2 8.15 MiB 9.12 MiB 991.34 KiB
2d3b03d 8.10 MiB 9.07 MiB 1000.83 KiB
3ba8d7e 8.29 MiB 9.36 MiB 1.07 MiB
f79eecf 8.29 MiB 9.36 MiB 1.07 MiB
24f71aa 8.10 MiB 9.16 MiB 1.07 MiB
322aa66 8.15 MiB 9.12 MiB 992.53 KiB

@marandaneto marandaneto marked this pull request as ready for review May 24, 2023 11:32
@marandaneto marandaneto merged commit 43760f9 into main May 24, 2023
@marandaneto marandaneto deleted the fix/return-futures branch May 24, 2023 11:33
@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Wrapped methods return a Future instead of executing right away ([#1476](https://github.com/getsentry/sentry-dart/pull/1476))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against db4233d

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.

2 participants