Skip to content

Implement cold start detection logic #6975

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 3 commits into from
May 20, 2025
Merged

Conversation

mrober
Copy link
Contributor

@mrober mrober commented May 20, 2025

Implement cold start detection logic as described in https://docs.google.com/document/d/1yEd8dCIzwNwLhRRwkDtzWFx9vxV5d-eQU-P47wDL40k/edit?usp=sharing

Also renamed process related functions to be more consistent to make the code less error prone. This is also described in the doc

Tested by unit tests and with the sessions test app

@mrober mrober requested a review from tejasd May 20, 2025 18:12
@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 20, 2025

Coverage Report 1

Affected Products

  • firebase-sessions

    Overall coverage changed from ? (248fd92) to 81.50% (f548589) by ?.

    47 individual files with coverage change

    FilenameBase (248fd92)Merge (f548589)Diff
    ApplicationInfo.kt?100.00%?
    AutoSessionEventEncoder.java?100.00%?
    DaggerFirebaseSessionsComponent.java?94.23%?
    EventGDTLogger.kt?70.00%?
    EventGDTLogger_Factory.java?0.00%?
    FirebaseSessions.kt?53.57%?
    FirebaseSessionsComponent.kt?65.79%?
    FirebaseSessionsComponent_MainModule_Companion_ApplicationInfoFactory.java?0.00%?
    FirebaseSessionsComponent_MainModule_Companion_SessionConfigsDataStoreFactory.java?0.00%?
    FirebaseSessionsComponent_MainModule_Companion_SessionDataStoreFactory.java?0.00%?
    FirebaseSessionsComponent_MainModule_Companion_TimeProviderFactory.java?100.00%?
    FirebaseSessionsComponent_MainModule_Companion_UuidGeneratorFactory.java?100.00%?
    FirebaseSessionsDependencies.kt?85.71%?
    FirebaseSessionsRegistrar.kt?90.91%?
    FirebaseSessions_Factory.java?0.00%?
    InstallationId.kt?100.00%?
    LocalOverrideSettings.kt?100.00%?
    LocalOverrideSettings_Factory.java?0.00%?
    ProcessDataManager.kt?71.43%?
    ProcessDataManagerImpl_Factory.java?0.00%?
    ProcessDetailsProvider.kt?76.00%?
    RemoteSettings.kt?88.41%?
    RemoteSettingsFetcher.kt?10.00%?
    RemoteSettingsFetcher_Factory.java?0.00%?
    RemoteSettings_Factory.java?0.00%?
    SessionConfigs.kt?95.45%?
    SessionData.kt?58.82%?
    SessionDataSerializer_Factory.java?0.00%?
    SessionDetails.kt?85.71%?
    SessionEvent.kt?100.00%?
    SessionEvents.kt?98.00%?
    SessionFirelogPublisher.kt?83.33%?
    SessionFirelogPublisherImpl_Factory.java?0.00%?
    SessionGenerator.kt?100.00%?
    SessionGenerator_Factory.java?0.00%?
    SessionsActivityLifecycleCallbacks.kt?18.75%?
    SessionsActivityLifecycleCallbacks_Factory.java?0.00%?
    SessionsSettings.kt?93.75%?
    SessionsSettings_Factory.java?0.00%?
    SessionSubscriber.kt?75.00%?
    SettingsCache.kt?80.56%?
    SettingsCacheImpl_Factory.java?0.00%?
    SettingsProvider.kt?50.00%?
    SharedSessionRepository.kt?80.00%?
    SharedSessionRepositoryImpl_Factory.java?0.00%?
    TimeProvider.kt?75.00%?
    UuidGenerator.kt?100.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/AFRv25wD7X.html

Copy link
Contributor

github-actions bot commented May 20, 2025

Test Results

 38 files   38 suites   46s ⏱️
 87 tests  87 ✅ 0 💤 0 ❌
174 runs  174 ✅ 0 💤 0 ❌

Results for commit 32ae332.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 20, 2025

Size Report 1

Affected Products

  • base

    TypeBase (248fd92)Merge (f548589)Diff
    apk (aggressive)?8.80 kB? (?)
    apk (release)?9.77 kB? (?)
  • firebase-sessions

    TypeBase (248fd92)Merge (f548589)Diff
    aar?218 kB? (?)
    apk (aggressive)?539 kB? (?)
    apk (release)?5.79 MB? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/nHm028LIrS.html

@mrober mrober merged commit 8f6581c into sessions-sharedrepo May 20, 2025
32 checks passed
@mrober mrober deleted the mrober/coldstart3 branch May 20, 2025 20:40
mrober added a commit that referenced this pull request May 22, 2025
Implement cold start detection logic as described in
https://docs.google.com/document/d/1yEd8dCIzwNwLhRRwkDtzWFx9vxV5d-eQU-P47wDL40k/edit?usp=sharing

Also renamed process related functions to be more consistent to make the
code less error prone. This is also described in the doc

Tested by unit tests and with the sessions test app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants