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 analysis #5529

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

AND-116: SDK size analysis #5529

wants to merge 2 commits into from

Conversation

andremion
Copy link
Contributor

@andremion andremion commented Dec 18, 2024

🎯 Goal

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

stream-chat-android-client

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-chat-android-client 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-chat-android-client
  • stream-chat-android-offline
  • stream-chat-android-ui-components
  • stream-chat-android-compose

🛠 Implementation details

  • Due to the many factors that can influence the impact of an SDK dependency's size on installed apps (Proguard, device properties, Play store optimizations), the calculation we make here is by measuring the size of the aar file.

  • The comparison task is triggered on every push request

  • The metrics update is triggered on every merge to develop

ℹ️ Further information

Once this PR gets merged and tested on the develop workflow, other PRs can be created to share these workflows in a shared repo so they can be reused in the video repo.

🎉 GIF

Size matters

Copy link
Contributor

github-actions bot commented Dec 18, 2024

SDK Size Comparison

SDK Before After Difference Status
stream-chat-android-client 2.68 MB 2.68 MB 0.00 MB 🟢
stream-chat-android-offline 0.82 MB 0.82 MB 0.00 MB 🟢
stream-chat-android-ui-components 2.77 MB 2.77 MB 0.00 MB 🟢
stream-chat-android-compose 3.92 MB 3.92 MB 0.00 MB 🟢

@GetStream GetStream deleted a comment from github-actions bot Dec 18, 2024
@andremion andremion changed the title compare sdk size on push WIP: compare sdk size on push Dec 20, 2024
@andremion andremion force-pushed the sdk-size-reporting branch 6 times, most recently from fe34338 to dcebb2a Compare December 23, 2024 09:41
@andremion andremion changed the title WIP: compare sdk size on push [WIP]AND-116: SDK size analyzes Dec 23, 2024
@andremion andremion changed the title [WIP]AND-116: SDK size analyzes [WIP]AND-116: SDK size analysis Dec 23, 2024
@andremion andremion marked this pull request as ready for review December 23, 2024 11:12
@andremion andremion requested a review from a team as a code owner December 23, 2024 11:12
@andremion andremion changed the title [WIP]AND-116: SDK size analysis AND-116: SDK size analysis Dec 23, 2024
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.

1 participant