Skip to content

Add a CrashlyticsWorkers container to manage the workers #6178

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
Aug 12, 2024

Conversation

mrober
Copy link
Contributor

@mrober mrober commented Aug 12, 2024

Add a CrashlyticsWorkers container to manage the workers, and define what each one is for. Also added a submitTaskOnSuccess method for convenience. This will be useful for any of the user actions that get triggered by send unsent reports.

Also found and fixed a bug in the worker queue. If a task gets cancelled and is followed by a runnable or callable already in the queue, it would have been skipped. Now it's not a problem, and a test case added.

Copy link
Contributor

github-actions bot commented Aug 12, 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).

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 12, 2024

Coverage Report 1

Affected Products

  • firebase-crashlytics

    Overall coverage changed from 11.13% (08deb69) to 11.27% (ee12c98) by +0.14%.

    FilenameBase (08deb69)Merge (ee12c98)Diff
    CrashlyticsController.java16.58%16.18%-0.40%
    CrashlyticsCore.java0.61%0.61%-0.00%
    CrashlyticsWorker.java30.30%23.26%-7.05%
    CrashlyticsWorkers.kt?26.32%?
    DataCollectionArbiter.java83.33%84.27%+0.94%

Test Logs

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

Copy link
Contributor

github-actions bot commented Aug 12, 2024

Unit Test Results

  8 files   -    178    8 suites   - 178   27s ⏱️ - 4m 12s
22 tests  - 1 212  22 ✔️  - 1 196  0 💤  - 16  0 ±0 
44 runs   - 2 448  44 ✔️  - 2 416  0 💤  - 32  0 ±0 

Results for commit 03fb48d. ± Comparison against base commit 08deb69.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 12, 2024

Size Report 1

Affected Products

  • firebase-crashlytics

    TypeBase (08deb69)Merge (ee12c98)Diff
    aar417 kB410 kB-6.71 kB (-1.6%)
    apk (aggressive)697 kB698 kB+716 B (+0.1%)
    apk (release)5.85 MB5.85 MB-4.70 kB (-0.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 12, 2024

Startup Time Report 1

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

Notes

Startup Times

  • fire-cls

    DeviceStatisticsDistributions
    oriole-32
    Percentile08deb69ee12c98DiffSignificant (?)
    p1011.2 ±2 ms9.83 ±1 ms-1.38 ms (-12.3%)NO
    p2511.8 ±2 ms10.5 ±1 ms-1.35 ms (-11.4%)NO
    p5012.9 ±2 ms11.3 ±1 ms-1.55 ms (-12.0%)NO
    p7514.3 ±2 ms12.5 ±2 ms-1.85 ms (-13.0%)NO
    p9016.2 ±3 ms13.9 ±2 ms-2.31 ms (-14.3%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
    redfin-30
    Percentile08deb69ee12c98DiffSignificant (?)
    p1015.7 ±6 ms15.6 ±6 ms-112 μs (-0.7%)NO
    p2516.7 ±6 ms16.5 ±7 ms-134 μs (-0.8%)NO
    p5017.8 ±7 ms17.8 ±8 ms-5.05 μs (-0.0%)NO
    p7519.6 ±8 ms19.4 ±9 ms-205 μs (-1.0%)NO
    p9021.5 ±9 ms21.4 ±10 ms-153 μs (-0.7%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
  • fire-rc

    DeviceStatisticsDistributions
    oriole-32
    Percentile08deb69ee12c98DiffSignificant (?)
    p1096.3 ±41 μs327 ±387 μs+231 μs (+239.7%)NO
    p25101 ±43 μs341 ±402 μs+240 μs (+236.7%)NO
    p50110 ±47 μs361 ±419 μs+251 μs (+227.9%)NO
    p75133 ±64 μs393 ±440 μs+260 μs (+195.6%)NO
    p90166 ±67 μs471 ±498 μs+305 μs (+184.0%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
    redfin-30
    Percentile08deb69ee12c98DiffSignificant (?)
    p10328 ±328 μs356 ±486 μs+27.4 μs (+8.3%)NO
    p25394 ±421 μs393 ±567 μs-1.00 μs (-0.3%)NO
    p50489 ±515 μs459 ±673 μs-29.6 μs (-6.1%)NO
    p75608 ±634 μs562 ±826 μs-45.6 μs (-7.5%)NO
    p90818 ±919 μs779 ±1102 μs-39.5 μs (-4.8%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
  • fire-sessions

    DeviceStatisticsDistributions
    oriole-32
    Percentile08deb69ee12c98DiffSignificant (?)
    p102.56 ±0.6 ms2.68 ±0.3 ms+128 μs (+5.0%)NO
    p252.75 ±0.6 ms2.81 ±0.3 ms+66.4 μs (+2.4%)NO
    p503.09 ±0.7 ms3.13 ±0.3 ms+44.0 μs (+1.4%)NO
    p753.54 ±0.7 ms3.75 ±0.5 ms+209 μs (+5.9%)NO
    p904.19 ±0.8 ms4.48 ±0.6 ms+289 μs (+6.9%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
    redfin-30
    Percentile08deb69ee12c98DiffSignificant (?)
    p106.45 ±2 ms5.76 ±1 ms-688 μs (-10.7%)NO
    p256.95 ±2 ms6.23 ±2 ms-722 μs (-10.4%)NO
    p507.97 ±3 ms6.72 ±2 ms-1.25 ms (-15.7%)NO
    p759.24 ±5 ms7.23 ±3 ms-2.01 ms (-21.8%)NO
    p9010.5 ±6 ms7.85 ±4 ms-2.63 ms (-25.1%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile08deb69ee12c98DiffSignificant (?)
    p10204 ±7 ms206 ±2 ms+2.63 ms (+1.3%)NO
    p25210 ±7 ms212 ±3 ms+2.15 ms (+1.0%)NO
    p50217 ±9 ms220 ±3 ms+3.09 ms (+1.4%)NO
    p75225 ±11 ms228 ±3 ms+2.29 ms (+1.0%)NO
    p90237 ±23 ms239 ±6 ms+1.81 ms (+0.8%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc
    redfin-30
    Percentile08deb69ee12c98DiffSignificant (?)
    p10242 ±4 ms264 ±6 ms+22.0 ms (+9.1%)MAYBE
    p25247 ±4 ms270 ±6 ms+22.4 ms (+9.1%)MAYBE
    p50254 ±4 ms276 ±7 ms+22.1 ms (+8.7%)MAYBE
    p75261 ±5 ms284 ±7 ms+23.4 ms (+9.0%)MAYBE
    p90269 ±6 ms296 ±10 ms+27.0 ms (+10.0%)NO

    20 test runs in comparison
    CommitTest Runs
    08deb69
    • 2024-08-12_16:45:45.130031_IGpv
    • 2024-08-12_16:45:45.130073_wxnP
    • 2024-08-12_16:45:45.130082_MbmW
    • 2024-08-12_16:45:45.130098_yuXv
    • 2024-08-12_16:45:45.130104_bMEu
    • 2024-08-12_16:45:45.130111_EBmU
    • 2024-08-12_16:45:45.130117_NxCQ
    • 2024-08-12_16:45:45.130140_AwFI
    • 2024-08-12_16:45:45.130147_pAof
    • 2024-08-12_16:45:45.130154_Gvwx
    ee12c98
    • 2024-08-12_19:45:44.832617_kKOz
    • 2024-08-12_19:45:44.832659_BILS
    • 2024-08-12_19:45:44.832669_oGGx
    • 2024-08-12_19:45:44.832684_xPli
    • 2024-08-12_19:45:44.832692_hscz
    • 2024-08-12_19:45:44.832699_QAXN
    • 2024-08-12_19:45:44.832707_GsgM
    • 2024-08-12_19:45:44.832714_nLIo
    • 2024-08-12_19:45:44.832720_LBTT
    • 2024-08-12_19:45:44.832727_xZIc

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

Copy link
Contributor

@themiswang themiswang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woooh thank you for the refactoring!

@mrober mrober merged commit 9535f94 into main Aug 12, 2024
41 of 42 checks passed
@mrober mrober deleted the crashlytics-workers branch August 12, 2024 19:42
@mrober
Copy link
Contributor Author

mrober commented Aug 12, 2024

#4345

mrober added a commit that referenced this pull request Aug 19, 2024
@firebase firebase locked and limited conversation to collaborators Sep 13, 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