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 (APK comparison) #5539

Merged
merged 18 commits into from
Jan 2, 2025

Conversation

andremion
Copy link
Collaborator

@andremion andremion commented Dec 31, 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

  • There are two metrics Android application projects 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

Copy link
Contributor

github-actions bot commented Dec 31, 2024

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.04 MB 3.04 MB 0.00 MB 🟢
stream-chat-android-offline 3.25 MB 3.25 MB 0.00 MB 🟢
stream-chat-android-ui-components 7.91 MB 7.91 MB 0.00 MB 🟢
stream-chat-android-compose 9.04 MB 9.04 MB 0.00 MB 🟢

@andremion andremion force-pushed the sdk-size-reporting-apk-comparison branch from 70afda9 to 16fba09 Compare December 31, 2024 13:51
@andremion andremion changed the title Sdk size reporting apk comparison AND-116: SDK size reporting (APK comparison) Dec 31, 2024
@andremion andremion marked this pull request as ready for review December 31, 2024 14:22
@andremion andremion requested a review from a team as a code owner December 31, 2024 14:22
build.gradle Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
.github/workflows/sdk-size-updates.yml Outdated Show resolved Hide resolved
.github/workflows/sdk-size-updates.yml Outdated Show resolved Hide resolved
@andremion andremion force-pushed the sdk-size-reporting-apk-comparison branch from c539804 to 54a6e54 Compare January 2, 2025 09:10
@andremion andremion requested a review from JcMinarro January 2, 2025 13:13
@JcMinarro JcMinarro merged commit e71d2ce into develop Jan 2, 2025
10 checks passed
@JcMinarro JcMinarro deleted the sdk-size-reporting-apk-comparison branch January 2, 2025 14:29
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