Skip to content

Configure google-services.json for macrobenchmark tests. #2653

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 4 commits into from
May 12, 2021

Conversation

yifanyang
Copy link
Contributor

@yifanyang yifanyang commented May 10, 2021

Downgrade gradle wrapper version from 7.0 to 6.9 to speed up test apps assembly.

  • macrobenchmark run with gradle 7.0 (total: 42m 23s)
    • assembleAllForSmokeTests (10m 51s)
    • assemble assembleAndroidTest (for all test apps, 5m 21s ~ 9m 46s)
  • macrobenchmark run with gradle 6.9 (total: 36m50s)
    • assembleAllForSmokeTests (8m 40s)
    • assemble assembleAndroidTest (for all test apps, 4m 15s ~ 7m 13s)

@yifanyang yifanyang requested review from vkryachko and rlazo May 10, 2021 17:27
@google-cla google-cla bot added the cla: yes Override cla label May 10, 2021
@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 10, 2021

Coverage Report

Affected SDKs

  • firebase-messaging

    SDK overall coverage changed from ? (f23b397) to 83.43% (64bf501f) by ?.

    Click to show coverage changes in 23 files.
    Filename Base (f23b397) Head (64bf501f) Diff
    CommonNotificationBuilder.java ? 91.63% ?
    Constants.java ? 92.86% ?
    DisplayNotification.java ? 91.38% ?
    EnhancedIntentService.java ? 80.00% ?
    ExecutorFactory.java ? 0.00% ?
    FcmExecutors.java ? 85.71% ?
    FirebaseMessaging.java ? 65.00% ?
    FirebaseMessagingRegistrar.java ? 83.33% ?
    FirebaseMessagingService.java ? 94.79% ?
    FirelogAnalyticsEvent.java ? 26.67% ?
    ImageDownload.java ? 87.18% ?
    MessagingAnalytics.java ? 63.93% ?
    NotificationParams.java ? 98.71% ?
    PoolableExecutors.java ? 29.17% ?
    RemoteMessage.java ? 95.48% ?
    RemoteMessageCreator.java ? 88.89% ?
    SendException.java ? 100.00% ?
    SharedPreferencesQueue.java ? 98.44% ?
    ThreadPriority.java ? 100.00% ?
    TopicOperation.java ? 90.00% ?
    TopicsStore.java ? 100.00% ?
    TopicsSubscriber.java ? 89.66% ?
    TopicsSyncTask.java ? 53.33% ?
  • firebase-perf

    SDK overall coverage changed from ? (f23b397) to 70.63% (64bf501f) by ?.

    Click to show coverage changes in 95 files.
    Filename Base (f23b397) Head (64bf501f) Diff
    AddTrace.java ? 0.00% ?
    AndroidApplicationInfo.java ? 34.71% ?
    AndroidApplicationInfoOrBuilder.java ? 0.00% ?
    AndroidLogger.java ? 97.78% ?
    AndroidMemoryReading.java ? 38.36% ?
    AndroidMemoryReadingOrBuilder.java ? 0.00% ?
    AppStartTrace.java ? 85.71% ?
    AppStateMonitor.java ? 86.78% ?
    AppStateUpdateHandler.java ? 92.59% ?
    ApplicationInfo.java ? 45.00% ?
    ApplicationInfoOrBuilder.java ? 0.00% ?
    ApplicationProcessState.java ? 73.91% ?
    Clock.java ? 100.00% ?
    ConfigResolver.java ? 97.23% ?
    ConfigurationConstants.java ? 99.21% ?
    ConfigurationFlag.java ? 100.00% ?
    Constants.java ? 95.65% ?
    Counter.java ? 90.91% ?
    CpuGaugeCollector.java ? 93.10% ?
    CpuMetricReading.java ? 39.33% ?
    CpuMetricReadingOrBuilder.java ? 0.00% ?
    DaggerFirebasePerformanceComponent.java ? 100.00% ?
    DeviceCacheManager.java ? 76.03% ?
    FirebasePerfApplicationInfoValidator.java ? 92.86% ?
    FirebasePerfGaugeMetricValidator.java ? 100.00% ?
    FirebasePerfHttpClient.java ? 93.85% ?
    FirebasePerfMetricProto.java ? 0.00% ?
    FirebasePerfNetworkValidator.java ? 86.67% ?
    FirebasePerfOkHttpClient.java ? 44.90% ?
    FirebasePerfProvider.java ? 76.92% ?
    FirebasePerfRegistrar.java ? 100.00% ?
    FirebasePerfTraceValidator.java ? 88.24% ?
    FirebasePerfUrlConnection.java ? 44.26% ?
    FirebasePerformance.java ? 82.95% ?
    FirebasePerformanceAttributable.java ? 0.00% ?
    FirebasePerformanceComponent.java ? 0.00% ?
    FirebasePerformanceInitializer.java ? 33.33% ?
    FirebasePerformanceModule.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesConfigResolverFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesFirebaseAppFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesFirebaseInstallationsFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesGaugeManagerFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesRemoteConfigComponentFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesRemoteConfigManagerFactory.java ? 100.00% ?
    FirebasePerformanceModule_ProvidesTransportFactoryProviderFactory.java ? 100.00% ?
    FirebasePerformance_Factory.java ? 100.00% ?
    FlgTransport.java ? 83.33% ?
    GaugeManager.java ? 98.39% ?
    GaugeMetadata.java ? 32.21% ?
    GaugeMetadataManager.java ? 84.21% ?
    GaugeMetadataOrBuilder.java ? 0.00% ?
    GaugeMetric.java ? 39.47% ?
    GaugeMetricOrBuilder.java ? 0.00% ?
    HttpMetric.java ? 91.78% ?
    ImmutableBundle.java ? 100.00% ?
    InstrHttpInputStream.java ? 92.86% ?
    InstrHttpOutputStream.java ? 98.00% ?
    InstrHttpURLConnection.java ? 93.42% ?
    InstrHttpsURLConnection.java ? 94.32% ?
    InstrURLConnectionBase.java ? 95.24% ?
    InstrumentApacheHttpResponseHandler.java ? 100.00% ?
    InstrumentOkHttpEnqueueCallback.java ? 100.00% ?
    LogWrapper.java ? 23.08% ?
    MemoryGaugeCollector.java ? 90.00% ?
    NetworkConnectionInfo.java ? 0.00% ?
    NetworkConnectionInfoOrBuilder.java ? 0.00% ?
    NetworkRequestMetric.java ? 49.16% ?
    NetworkRequestMetricBuilder.java ? 95.97% ?
    NetworkRequestMetricBuilderUtil.java ? 75.00% ?
    NetworkRequestMetricOrBuilder.java ? 0.00% ?
    Optional.java ? 86.67% ?
    PendingPerfEvent.java ? 100.00% ?
    PerfMetric.java ? 33.67% ?
    PerfMetricOrBuilder.java ? 0.00% ?
    PerfMetricValidator.java ? 90.32% ?
    PerfSession.java ? 93.33% ?
    PerfSessionOrBuilder.java ? 0.00% ?
    RateLimiter.java ? 90.27% ?
    RemoteConfigManager.java ? 92.24% ?
    ResourceType.java ? 0.00% ?
    SessionAwareObject.java ? 0.00% ?
    SessionManager.java ? 100.00% ?
    SessionVerbosity.java ? 68.42% ?
    StorageUnit.java ? 57.89% ?
    Timer.java ? 93.75% ?
    Trace.java ? 96.69% ?
    TraceMetric.java ? 43.42% ?
    TraceMetricBuilder.java ? 100.00% ?
    TraceMetricOrBuilder.java ? 0.00% ?
    TransportInfo.java ? 0.00% ?
    TransportInfoOrBuilder.java ? 0.00% ?
    TransportManager.java ? 95.10% ?
    URLAllowlist.java ? 94.44% ?
    URLWrapper.java ? 0.00% ?
    Utils.java ? 78.57% ?
  • firebase-storage

    SDK overall coverage changed from ? (f23b397) to 85.85% (64bf501f) by ?.

    Click to show coverage changes in 46 files.
    Filename Base (f23b397) Head (64bf501f) Diff
    ActivityLifecycleListener.java ? 74.14% ?
    AdaptiveStreamBuffer.java ? 84.62% ?
    CancelException.java ? 100.00% ?
    CancellableTask.java ? 100.00% ?
    ControllableTask.java ? 100.00% ?
    DeleteNetworkRequest.java ? 100.00% ?
    DeleteStorageTask.java ? 100.00% ?
    ExponentialBackoffSender.java ? 86.00% ?
    FileDownloadTask.java ? 80.00% ?
    FirebaseStorage.java ? 85.11% ?
    FirebaseStorageComponent.java ? 100.00% ?
    GetDownloadUrlTask.java ? 96.77% ?
    GetMetadataNetworkRequest.java ? 100.00% ?
    GetMetadataTask.java ? 85.19% ?
    GetNetworkRequest.java ? 100.00% ?
    HttpURLConnectionFactory.java ? 0.00% ?
    HttpURLConnectionFactoryImpl.java ? 50.00% ?
    ListNetworkRequest.java ? 100.00% ?
    ListResult.java ? 100.00% ?
    ListTask.java ? 85.71% ?
    NetworkRequest.java ? 86.67% ?
    OnPausedListener.java ? 0.00% ?
    OnProgressListener.java ? 0.00% ?
    ResumableNetworkRequest.java ? 100.00% ?
    ResumableUploadByteRequest.java ? 90.91% ?
    ResumableUploadCancelRequest.java ? 100.00% ?
    ResumableUploadQueryRequest.java ? 100.00% ?
    ResumableUploadStartRequest.java ? 95.24% ?
    Slashes.java ? 88.24% ?
    Sleeper.java ? 0.00% ?
    SleeperImpl.java ? 33.33% ?
    SmartHandler.java ? 87.50% ?
    StorageException.java ? 65.45% ?
    StorageMetadata.java ? 86.34% ?
    StorageReference.java ? 89.94% ?
    StorageReferenceUri.java ? 100.00% ?
    StorageRegistrar.java ? 100.00% ?
    StorageTask.java ? 84.29% ?
    StorageTaskManager.java ? 100.00% ?
    StorageTaskScheduler.java ? 100.00% ?
    StreamDownloadTask.java ? 88.89% ?
    TaskListenerImpl.java ? 100.00% ?
    UpdateMetadataNetworkRequest.java ? 100.00% ?
    UpdateMetadataTask.java ? 82.14% ?
    UploadTask.java ? 80.58% ?
    Util.java ? 73.24% ?

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (64bf501f) is created by Prow via merging commits: f23b397 f41c024.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 10, 2021

Binary Size Report

Affected SDKs

No changes between base commit (f23b397) and head commit (64bf501f).

Test Logs

Notes

Head commit (64bf501f) is created by Prow via merging commits: f23b397 f41c024.

@yifanyang
Copy link
Contributor Author

/test macrobenchmark

1 similar comment
@yifanyang
Copy link
Contributor Author

/test macrobenchmark

@yifanyang
Copy link
Contributor Author

@vkryachko

About the unsatisfied dependency exception in inappmessaging, I have tried to build the test app with and without this line in app/proguard-rules.pro.

-keep class * implements com.google.firebase.components.ComponentRegistrar

The final apks (app-release.apk) and proguard mappings (mapping.txt) are identical (md5-wise) in these two cases. Also in the classes.dex file in the apk, both:

  • FirebaseInAppMessagingDisplayRegistrar
  • FirebaseInAppMessagingRegistrar

are retained under com/google/firebase/inappmessaging. These seem to be the only two relevant classes implementing ComponentRegistrar, so I assume that there's no problem with proguarding.

The above error message translated back via the proguard mappings is:

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay]>{2, type=0, deps=[Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, injection=direct}, Dependency{anInterface=class com.google.firebase.inappmessaging.FirebaseInAppMessaging, type=required, injection=direct}, Dependency{anInterface=interface com.google.firebase.analytics.connector.AnalyticsConnector, type=required, injection=direct}]}: interface com.google.firebase.analytics.connector.AnalyticsConnector

Does it imply that analytics is required here for some reason? I'm going to try to add com.google.firebase:firebase-analytics-ktx:18.0.3 as a dependency and see if I still run into this problem.

@vkryachko
Copy link
Member

It looks like it's indeed required, even though it does not have a maven dependency on analytics:

Component.builder(FirebaseInAppMessagingDisplay.class)
.add(Dependency.required(FirebaseApp.class))
.add(Dependency.required(AnalyticsConnector.class))

dependencies {
implementation project(':firebase-common')
implementation project(':firebase-components')
implementation project(':firebase-inappmessaging')
implementation('com.google.firebase:firebase-measurement-connector:18.0.0') {
exclude group: 'com.google.firebase', module: 'firebase-common'
}
implementation 'com.google.android.gms:play-services-tasks:17.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.auto.value:auto-value-annotations:1.6.6'
implementation "com.squareup.picasso:picasso:2.71828"
implementation "com.squareup.okhttp:okhttp:2.7.5"
vendor ('com.google.dagger:dagger:2.27') {
exclude group: "javax.inject", module: "javax.inject"
}
implementation 'javax.inject:javax.inject:1'

Worth checking with @eldhosembabu @prakhar1989 as to why that would be the case

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 11, 2021

@yifanyang: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
smoke-tests f41c024 link /test smoke-tests
device-check-changed f41c024 link /test device-check-changed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@yifanyang
Copy link
Contributor Author

/test macrobenchmark

@yifanyang
Copy link
Contributor Author

/test check-changed

@yifanyang yifanyang merged commit 1fba4a7 into master May 12, 2021
@yifanyang yifanyang deleted the yifany/macrobenchmark branch May 12, 2021 02:12
@firebase firebase locked and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants