Skip to content

Changing Fireperf's SDK Floats to Doubles #4874

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 6 commits into from
Apr 11, 2023

Conversation

jposuna
Copy link
Contributor

@jposuna jposuna commented Apr 7, 2023

RC Flags are stored as Double and our SDK loses precision when converting back to Float. This causes sampling rates to not behave as expected.

…and our SDK loses precision when converting back to Float. This causes sampling rates to not behave as expected.
@jposuna jposuna requested review from raymondlam and visumickey April 7, 2023 18:28
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 7, 2023

Coverage Report 1

Affected Products

  • firebase-perf

    Overall coverage changed from 71.16% (5f273c7) to 71.18% (9a2f9d2) by +0.03%.

    FilenameBase (5f273c7)Merge (9a2f9d2)Diff
    DeviceCacheManager.java76.03%76.42%+0.39%

Test Logs

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

Unit Test Results

   102 files   -    647     102 suites   - 647   2m 43s ⏱️ - 27m 4s
   975 tests  - 3 879     975 ✔️  - 3 856  0 💤  - 21  0  - 2 
1 950 runs   - 7 084  1 950 ✔️  - 7 040  0 💤  - 42  0  - 2 

Results for commit 351a810. ± Comparison against base commit fe8c9df.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 7, 2023

Size Report 1

Affected Products

  • firebase-perf

    TypeBase (5f273c7)Merge (9a2f9d2)Diff
    aar315 kB315 kB+261 B (+0.1%)
    apk (aggressive)957 kB957 kB-4 B (-0.0%)
    apk (release)2.95 MB2.95 MB+252 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 7, 2023

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-perf

    DeviceStatisticsDistributions
    oriole-32
    Percentile5f273c79a2f9d2DiffSignificant (?)
    p10264 ±28 μs262 ±26 μs-1.67 μs (-0.6%)NO
    p25277 ±31 μs273 ±23 μs-4.46 μs (-1.6%)NO
    p50297 ±32 μs293 ±20 μs-3.79 μs (-1.3%)NO
    p75337 ±35 μs328 ±17 μs-8.78 μs (-2.6%)NO
    p90393 ±35 μs376 ±24 μs-17.3 μs (-4.4%)NO

    20 test runs in comparison
    CommitTest Runs
    5f273c7
    • 2023-04-11_00:06:32.092533_BcBm
    • 2023-04-11_00:06:32.098995_kPkJ
    • 2023-04-11_00:06:32.099015_aawx
    • 2023-04-11_00:06:32.099022_GduQ
    • 2023-04-11_00:06:32.099029_qyuQ
    • 2023-04-11_00:06:32.099388_elcQ
    • 2023-04-11_00:06:32.099397_hkRW
    • 2023-04-11_00:06:32.099404_bAPF
    • 2023-04-11_00:06:32.099411_HWDp
    • 2023-04-11_00:06:32.099417_MfLh
    9a2f9d2
    • 2023-04-11_17:43:02.584131_ZGhR
    • 2023-04-11_17:43:02.585279_fETO
    • 2023-04-11_17:43:02.585287_wvAm
    • 2023-04-11_17:43:02.585293_oSbc
    • 2023-04-11_17:43:02.585299_dGMy
    • 2023-04-11_17:43:02.585309_OKvA
    • 2023-04-11_17:43:02.585315_sMyg
    • 2023-04-11_17:43:02.585320_PtEW
    • 2023-04-11_17:43:02.585325_pOiu
    • 2023-04-11_17:43:02.585331_wsvX
    redfin-30
    Percentile5f273c79a2f9d2DiffSignificant (?)
    p10800 ±65 μs811 ±72 μs+11.1 μs (+1.4%)NO
    p25835 ±59 μs853 ±73 μs+17.6 μs (+2.1%)NO
    p50888 ±67 μs916 ±73 μs+27.5 μs (+3.1%)NO
    p75982 ±102 μs1.00 ±0.08 ms+20.1 μs (+2.1%)NO
    p901.14 ±0.2 ms1.19 ±0.2 ms+42.6 μs (+3.7%)NO

    20 test runs in comparison
    CommitTest Runs
    5f273c7
    • 2023-04-11_00:06:32.092533_BcBm
    • 2023-04-11_00:06:32.098995_kPkJ
    • 2023-04-11_00:06:32.099015_aawx
    • 2023-04-11_00:06:32.099022_GduQ
    • 2023-04-11_00:06:32.099029_qyuQ
    • 2023-04-11_00:06:32.099388_elcQ
    • 2023-04-11_00:06:32.099397_hkRW
    • 2023-04-11_00:06:32.099404_bAPF
    • 2023-04-11_00:06:32.099411_HWDp
    • 2023-04-11_00:06:32.099417_MfLh
    9a2f9d2
    • 2023-04-11_17:43:02.584131_ZGhR
    • 2023-04-11_17:43:02.585279_fETO
    • 2023-04-11_17:43:02.585287_wvAm
    • 2023-04-11_17:43:02.585293_oSbc
    • 2023-04-11_17:43:02.585299_dGMy
    • 2023-04-11_17:43:02.585309_OKvA
    • 2023-04-11_17:43:02.585315_sMyg
    • 2023-04-11_17:43:02.585320_PtEW
    • 2023-04-11_17:43:02.585325_pOiu
    • 2023-04-11_17:43:02.585331_wsvX
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile5f273c79a2f9d2DiffSignificant (?)
    p10193 ±7 ms196 ±4 ms+2.94 ms (+1.5%)NO
    p25199 ±8 ms202 ±5 ms+2.86 ms (+1.4%)NO
    p50206 ±8 ms210 ±6 ms+3.52 ms (+1.7%)NO
    p75215 ±11 ms219 ±6 ms+3.53 ms (+1.6%)NO
    p90225 ±17 ms232 ±8 ms+7.07 ms (+3.1%)NO

    20 test runs in comparison
    CommitTest Runs
    5f273c7
    • 2023-04-11_00:06:32.092533_BcBm
    • 2023-04-11_00:06:32.098995_kPkJ
    • 2023-04-11_00:06:32.099015_aawx
    • 2023-04-11_00:06:32.099022_GduQ
    • 2023-04-11_00:06:32.099029_qyuQ
    • 2023-04-11_00:06:32.099388_elcQ
    • 2023-04-11_00:06:32.099397_hkRW
    • 2023-04-11_00:06:32.099404_bAPF
    • 2023-04-11_00:06:32.099411_HWDp
    • 2023-04-11_00:06:32.099417_MfLh
    9a2f9d2
    • 2023-04-11_17:43:02.584131_ZGhR
    • 2023-04-11_17:43:02.585279_fETO
    • 2023-04-11_17:43:02.585287_wvAm
    • 2023-04-11_17:43:02.585293_oSbc
    • 2023-04-11_17:43:02.585299_dGMy
    • 2023-04-11_17:43:02.585309_OKvA
    • 2023-04-11_17:43:02.585315_sMyg
    • 2023-04-11_17:43:02.585320_PtEW
    • 2023-04-11_17:43:02.585325_pOiu
    • 2023-04-11_17:43:02.585331_wsvX
    redfin-30
    Percentile5f273c79a2f9d2DiffSignificant (?)
    p10232 ±4 ms254 ±4 ms+22.6 ms (+9.8%)YES
    p25237 ±4 ms261 ±4 ms+23.3 ms (+9.8%)YES
    p50244 ±4 ms269 ±4 ms+24.9 ms (+10.2%)YES
    p75252 ±4 ms277 ±5 ms+25.3 ms (+10.0%)YES
    p90261 ±6 ms290 ±7 ms+29.5 ms (+11.3%)MAYBE

    20 test runs in comparison
    CommitTest Runs
    5f273c7
    • 2023-04-11_00:06:32.092533_BcBm
    • 2023-04-11_00:06:32.098995_kPkJ
    • 2023-04-11_00:06:32.099015_aawx
    • 2023-04-11_00:06:32.099022_GduQ
    • 2023-04-11_00:06:32.099029_qyuQ
    • 2023-04-11_00:06:32.099388_elcQ
    • 2023-04-11_00:06:32.099397_hkRW
    • 2023-04-11_00:06:32.099404_bAPF
    • 2023-04-11_00:06:32.099411_HWDp
    • 2023-04-11_00:06:32.099417_MfLh
    9a2f9d2
    • 2023-04-11_17:43:02.584131_ZGhR
    • 2023-04-11_17:43:02.585279_fETO
    • 2023-04-11_17:43:02.585287_wvAm
    • 2023-04-11_17:43:02.585293_oSbc
    • 2023-04-11_17:43:02.585299_dGMy
    • 2023-04-11_17:43:02.585309_OKvA
    • 2023-04-11_17:43:02.585315_sMyg
    • 2023-04-11_17:43:02.585320_PtEW
    • 2023-04-11_17:43:02.585325_pOiu
    • 2023-04-11_17:43:02.585331_wsvX

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

Copy link
Contributor

@visumickey visumickey left a comment

Choose a reason for hiding this comment

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

The changes look good to me.

There is one scenario I'm curious about for testing - Is there a test we can write for one flag that is already cached as Float and how with this new code change we are backward compatible?

@jposuna jposuna requested a review from visumickey April 11, 2023 00:53
@jposuna jposuna merged commit a267b21 into master Apr 11, 2023
@jposuna jposuna deleted the jposuna-fireperf-float-to-double branch April 11, 2023 19:59
@firebase firebase locked and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants