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

AND-116: SDK size reporting #1266

Merged
merged 10 commits into from
Jan 10, 2025
Merged

AND-116: SDK size reporting #1266

merged 10 commits into from
Jan 10, 2025

Conversation

andremion
Copy link
Contributor

@andremion andremion commented Jan 2, 2025

🎯 Goal

Show SDK size badges in the README file, e.g.:

stream-video-android-core

Compare sizes before and after a PR and show them in a comparison table as a PR comment, e.g.:

SDK Before After Difference Status
stream-video-android-core 2.68 MB 2.68 MB 0.00 MB 🟢

Max tolerance is 500 KB
Fine tolerance is 250 KB

if the difference is less than zero, then the status is 🚀
if the difference is greater or equal to the max tolerance, then the status is 🔴
if the difference is greater or equal to the fine tolerance, then the status is 🟡
otherwise, the status is 🟢

Sizes are calculated for the following SDKs:

  • stream-video-android-core
  • stream-video-android-ui-xml
  • stream-video-android-ui-compose

🛠 Implementation details

  • There are two metrics build flavors for each SDK:

    • One is used as a baseline, and the other includes the SDK
  • The size calculation is achieved by comparing a baseline APK with an APK that includes the SDK

  • The comparison task is triggered on every push request

  • The metrics update is triggered on every merge to develop

🎉 GIF

Size matters

@andremion andremion changed the title AND-116: Report SDK sizes AND-116: SDK size reporting Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 0.00 MB 10.91 MB 10.91 MB 🔴
stream-video-android-ui-xml 0.00 MB 5.81 MB 5.81 MB 🔴
stream-video-android-ui-compose 0.00 MB 5.79 MB 5.79 MB 🔴

@andremion andremion force-pushed the sdk-size-reporting branch 2 times, most recently from 59007e9 to 18e0a61 Compare January 3, 2025 12:46
@andremion andremion marked this pull request as ready for review January 3, 2025 12:49
@andremion andremion requested a review from a team as a code owner January 3, 2025 12:49
@aleksandar-apostolov aleksandar-apostolov requested review from aleksandar-apostolov and removed request for a team January 3, 2025 13:37
@aleksandar-apostolov aleksandar-apostolov enabled auto-merge (squash) January 10, 2025 14:51
@aleksandar-apostolov aleksandar-apostolov merged commit 6835607 into develop Jan 10, 2025
6 checks passed
@aleksandar-apostolov aleksandar-apostolov deleted the sdk-size-reporting branch January 10, 2025 14:54
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.

3 participants