Skip to content

Generalize the CrashlyticsWorker #6126

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 7 commits into from
Jul 26, 2024
Merged

Generalize the CrashlyticsWorker #6126

merged 7 commits into from
Jul 26, 2024

Conversation

mrober
Copy link
Contributor

@mrober mrober commented Jul 26, 2024

Generalize the CrashlyticsWorker.

The old CrashlyticsBackgroundWorker has a lot of overhead. Local experimentation shows this generalized worker manages submitting tasks about 4 times as fast.

The old background worker has some inaccurate Javadoc. I corrected and verified every detail mentioned in the Javadoc with integration tests. We can rely on it now.

I also found a bug in the old worker. If you cancel a task then submit a runnable or callable, that will never execute because the chain breaks. I fixed it in the general worker and added test cases.

Next steps will be to utilize the generic worker for the proposed common, network, and disk write workers.

Copy link
Contributor

github-actions bot commented Jul 26, 2024

Release note changes

No release note changes were detected. If you made changes that should be
present in the next release, ensure you've added an entry in the appropriate
CHANGELOG.md file(s).

@mrober
Copy link
Contributor Author

mrober commented Jul 26, 2024

#4345

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 26, 2024

Coverage Report 1

Affected Products

  • firebase-crashlytics

    Overall coverage changed from ? (0b026b2) to 11.22% (44fdfb9) by ?.

    131 individual files with coverage change

    FilenameBase (0b026b2)Merge (44fdfb9)Diff
    AnalyticsDeferredProxy.java?0.00%?
    AnalyticsEventLogger.java?0.00%?
    AnalyticsEventReceiver.java?0.00%?
    AppData.java?50.00%?
    AutoCrashlyticsReportEncoder.java?57.80%?
    AutoRolloutAssignmentEncoder.java?0.00%?
    AutoValue_CrashlyticsReport.java?0.00%?
    AutoValue_CrashlyticsReportWithSessionId.java?0.00%?
    AutoValue_CrashlyticsReport_ApplicationExitInfo.java?58.42%?
    AutoValue_CrashlyticsReport_ApplicationExitInfo_BuildIdMappingForArch.java?0.00%?
    AutoValue_CrashlyticsReport_CustomAttribute.java?0.00%?
    AutoValue_CrashlyticsReport_FilesPayload.java?0.00%?
    AutoValue_CrashlyticsReport_FilesPayload_File.java?0.00%?
    AutoValue_CrashlyticsReport_Session.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Application.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Application_Organization.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Device.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_BinaryImage.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Exception.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Signal.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Thread.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Thread_Frame.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_ProcessDetails.java?40.35%?
    AutoValue_CrashlyticsReport_Session_Event_Device.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Log.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_RolloutAssignment.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_RolloutAssignment_RolloutVariant.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_RolloutsState.java?0.00%?
    AutoValue_CrashlyticsReport_Session_OperatingSystem.java?0.00%?
    AutoValue_CrashlyticsReport_Session_User.java?0.00%?
    AutoValue_InstallIdProvider_InstallIds.java?0.00%?
    AutoValue_RolloutAssignment.java?0.00%?
    AutoValue_StaticSessionData.java?0.00%?
    AutoValue_StaticSessionData_AppData.java?0.00%?
    AutoValue_StaticSessionData_DeviceData.java?0.00%?
    AutoValue_StaticSessionData_OsData.java?0.00%?
    BackgroundPriorityRunnable.java?0.00%?
    BatteryState.java?0.00%?
    BlockingAnalyticsEventLogger.java?0.00%?
    BreadcrumbAnalyticsEventReceiver.java?0.00%?
    BreadcrumbHandler.java?0.00%?
    BreadcrumbSource.java?0.00%?
    BuildIdInfo.java?62.50%?
    BytesBackedNativeSessionFile.java?0.00%?
    CachedSettingsIo.java?0.00%?
    CLSUUID.java?0.00%?
    CommonUtils.java?1.09%?
    CrashlyticsAnalyticsListener.java?0.00%?
    CrashlyticsAppQualitySessionsStore.java?0.00%?
    CrashlyticsAppQualitySessionsSubscriber.java?0.00%?
    CrashlyticsBackgroundWorker.java?56.25%?
    CrashlyticsController.java?16.10%?
    CrashlyticsCore.java?0.61%?
    CrashlyticsFileMarker.java?30.77%?
    CrashlyticsLifecycleEvents.java?0.00%?
    CrashlyticsNativeComponent.java?0.00%?
    CrashlyticsNativeComponentDeferredProxy.java?25.00%?
    CrashlyticsOriginAnalyticsEventLogger.java?0.00%?
    CrashlyticsPreconditions.kt?0.00%?
    CrashlyticsRegistrar.java?0.00%?
    CrashlyticsRemoteConfigListener.kt?0.00%?
    CrashlyticsReport.java?4.65%?
    CrashlyticsReportDataCapture.java?3.33%?
    CrashlyticsReportJsonTransform.java?1.01%?
    CrashlyticsReportPersistence.java?3.06%?
    CrashlyticsReportWithSessionId.java?0.00%?
    CrashlyticsUncaughtExceptionHandler.java?0.00%?
    CrashlyticsWorker.java?0.00%?
    CurrentTimeProvider.java?0.00%?
    CustomKeysAndValues.java?0.00%?
    DataCollectionArbiter.java?83.33%?
    DataTransportCrashlyticsReportSender.java?48.28%?
    DefaultSettingsJsonTransform.java?0.00%?
    DefaultSettingsSpiCall.java?0.00%?
    DeliveryMechanism.java?0.00%?
    DevelopmentPlatformProvider.java?0.00%?
    DisabledBreadcrumbSource.java?0.00%?
    ExecutorUtils.java?0.00%?
    FileBackedNativeSessionFile.java?0.00%?
    FileLogStore.java?0.00%?
    FileStore.java?29.85%?
    FirebaseCrashlytics.java?0.00%?
    FirebaseCrashlytics.kt?0.00%?
    FirebaseInstallationId.kt?0.00%?
    HttpGetRequest.java?0.00%?
    HttpRequestFactory.java?0.00%?
    HttpResponse.java?0.00%?
    IdManager.java?2.74%?
    InstallerPackageNameProvider.java?0.00%?
    InstallIdProvider.java?0.00%?
    KeysMap.java?24.32%?
    KeyValueBuilder.kt?0.00%?
    LogFileManager.java?60.71%?
    Logger.java?40.54%?
    MetaDataStore.java?17.83%?
    MiddleOutFallbackStrategy.java?0.00%?
    MiddleOutStrategy.java?0.00%?
    NativeSessionFile.java?0.00%?
    NativeSessionFileGzipper.java?0.00%?
    NativeSessionFileProvider.java?0.00%?
    OnDemandCounter.java?0.00%?
    ProcessDetailsProvider.kt?70.59%?
    QueueFile.java?0.00%?
    QueueFileLogStore.java?7.58%?
    RemoteConfigDeferredProxy.java?0.00%?
    RemoveRepeatsStrategy.java?0.00%?
    ReportQueue.java?0.00%?
    ResponseParser.java?0.00%?
    RolloutAssignment.java?0.00%?
    RolloutAssignmentList.java?44.44%?
    SessionReportingCoordinator.java?42.11%?
    Settings.java?95.00%?
    SettingsCacheBehavior.java?0.00%?
    SettingsController.java?0.00%?
    SettingsJsonConstants.java?0.00%?
    SettingsJsonParser.java?0.00%?
    SettingsJsonTransform.java?0.00%?
    SettingsProvider.java?0.00%?
    SettingsRequest.java?0.00%?
    SettingsSpiCall.java?0.00%?
    SettingsV3JsonTransform.java?0.00%?
    StackTraceTrimmingStrategy.java?0.00%?
    StaticSessionData.java?0.00%?
    SystemCurrentTimeProvider.java?0.00%?
    TrimmedThrowableData.java?0.00%?
    UnavailableAnalyticsEventLogger.java?0.00%?
    UserMetadata.java?22.12%?
    Utils.java?0.00%?

Test Logs

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

Copy link
Contributor

github-actions bot commented Jul 26, 2024

Unit Test Results

  8 files  +  8    8 suites  +8   28s ⏱️ +28s
22 tests +22  22 ✔️ +22  0 💤 ±0  0 ±0 
44 runs  +44  44 ✔️ +44  0 💤 ±0  0 ±0 

Results for commit 92e693b. ± Comparison against base commit 1b49171.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 26, 2024

Size Report 1

Affected Products

  • firebase-crashlytics

    TypeBase (0b026b2)Merge (44fdfb9)Diff
    aar417 kB419 kB+1.90 kB (+0.5%)
    apk (release)5.84 MB5.85 MB+2.53 kB (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 26, 2024

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Startup time comparison between the CI merge commit (44fdfb9) and the base commit (0b026b2) are not available.

No macrobenchmark data found for the base commit (0b026b2). Analysis for the CI merge commit (44fdfb9) can be found at:

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

@mrober mrober enabled auto-merge (squash) July 26, 2024 15:59
@mrober mrober merged commit 705d7a3 into main Jul 26, 2024
40 of 41 checks passed
@mrober mrober deleted the crashlytics-worker branch July 26, 2024 16:02
@firebase firebase locked and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants