Skip to content

Fix inaccurate activity screen metrics. #2736

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
Jun 25, 2021
Merged

Fix inaccurate activity screen metrics. #2736

merged 3 commits into from
Jun 25, 2021

Conversation

jeremyjiang-dev
Copy link
Contributor

@jeremyjiang-dev jeremyjiang-dev commented Jun 15, 2021

This PR is to fix:

  1. [Performance][UIBlocking] AppStateMonitor Collect Activity Frame Data Prob #2672
  2. Screen trace data not tracked for Android API levels 23 and below (b/191954905).

Summary of changes:

  1. Replaced frameMetricsAggregator.remove(activity) with frameMetricsAggregator.reset() because remove does not clean the frame metrics, causes frame metrics for each activity is added on top of the data for all previous pages.
  2. Removed checks for hardware accelerated. The reason for adding this check is due to the crash by calling frameMetricsAggregator.remove(activity) (see b/133827763). However, this check will return false even if hardware acceleration is turned on by default. Now, if an activity is not hardware accelerated, the metrics will just be 0.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 15, 2021

Coverage Report

Affected SDKs

  • firebase-perf

    SDK overall coverage changed from 70.72% (011b65b) to 70.71% (b057f165) by -0.01%.

    Filename Base (011b65b) Head (b057f165) Diff
    AppStateMonitor.java 86.78% 86.63% -0.15%

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 (b057f165) is created by Prow via merging commits: 011b65b 8af227e.

@jeremyjiang-dev jeremyjiang-dev marked this pull request as ready for review June 15, 2021 21:00
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 15, 2021

Binary Size Report

Affected SDKs

  • firebase-perf

    Type Base (011b65b) Head (b057f165) Diff
    aar 299 kB 299 kB -161 B (-0.1%)
    apk (aggressive) 969 kB 969 kB -192 B (-0.0%)
    apk (release) 2.43 MB 2.43 MB -400 B (-0.0%)

Test Logs

Notes

Head commit (b057f165) is created by Prow via merging commits: 011b65b 8af227e.

@jeremyjiang-dev
Copy link
Contributor Author

/test check-changed

@jeremyjiang-dev jeremyjiang-dev requested a review from rlazo June 16, 2021 15:21
@visumickey visumickey requested a review from mrichards June 18, 2021 19:35
@jeremyjiang-dev
Copy link
Contributor Author

/test macrobenchmark

@google-oss-bot
Copy link
Contributor

Macrobenchmark Report

Affected SDKs

Measurements are for head commit (5e9b2bf). Diffing against base commit (91681dd) is working in progress.

  • baseline

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait146.0 ms183.0 ms160.5 ms168.2 ms180.5 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait39.0 ms77.0 ms58.0 ms65.0 ms74.7 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait61.0 ms99.0 ms84.0 ms97.2 ms99.0 ms
  • firebase-common

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait128.0 ms157.0 ms144.5 ms151.6 ms157.0 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait42.0 ms67.0 ms54.0 ms62.1 ms66.2 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait55.0 ms88.0 ms70.5 ms79.2 ms86.7 ms
  • firebase-config

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait128.0 ms171.0 ms147.0 ms162.1 ms169.5 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait37.0 ms61.0 ms57.0 ms61.0 ms61.0 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait52.0 ms101.0 ms70.5 ms83.2 ms98.0 ms
  • firebase-crashlytics

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait143.0 ms179.0 ms155.0 ms172.3 ms178.2 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait36.0 ms74.0 ms54.0 ms60.3 ms71.9 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait55.0 ms86.0 ms73.5 ms78.3 ms85.0 ms
  • firebase-database

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait125.0 ms170.0 ms147.5 ms159.5 ms168.9 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait36.0 ms65.0 ms51.0 ms58.3 ms64.2 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait67.0 ms89.0 ms73.0 ms84.3 ms88.6 ms
  • firebase-dynamic-links

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait122.0 ms157.0 ms138.0 ms155.1 ms156.8 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait45.0 ms68.0 ms54.5 ms64.2 ms67.6 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait56.0 ms88.0 ms71.0 ms86.1 ms87.8 ms
  • firebase-firestore

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait129.0 ms166.0 ms142.0 ms160.3 ms165.4 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait46.0 ms60.0 ms52.0 ms57.1 ms59.6 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait53.0 ms85.0 ms71.0 ms79.5 ms84.8 ms
  • firebase-functions

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait132.0 ms161.0 ms146.0 ms154.4 ms160.4 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait30.0 ms67.0 ms54.5 ms64.2 ms66.8 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait60.0 ms88.0 ms68.5 ms83.2 ms87.4 ms
  • firebase-inappmessaging-display

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait155.0 ms211.0 ms189.5 ms202.0 ms209.3 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait32.0 ms76.0 ms55.0 ms63.2 ms75.6 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait59.0 ms117.0 ms77.0 ms89.8 ms113.2 ms
  • firebase-messaging

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait134.0 ms214.0 ms148.0 ms168.9 ms207.0 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait34.0 ms69.0 ms53.5 ms66.2 ms68.8 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait53.0 ms101.0 ms71.5 ms90.2 ms99.3 ms
  • firebase-perf

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait139.0 ms175.0 ms156.5 ms169.0 ms173.9 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait46.0 ms65.0 ms51.5 ms58.0 ms63.7 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait60.0 ms83.0 ms73.0 ms82.0 ms82.8 ms
  • firebase-storage

    NameDeviceMinMaxP50P90P99
    BenchmarkTest.startup[mode=COLD]flame-30-en-portrait126.0 ms158.0 ms145.5 ms152.0 ms156.9 ms
    BenchmarkTest.startup[mode=HOT]flame-30-en-portrait41.0 ms73.0 ms56.0 ms63.0 ms71.1 ms
    BenchmarkTest.startup[mode=WARM]flame-30-en-portrait59.0 ms95.0 ms78.0 ms90.2 ms94.4 ms

@jeremyjiang-dev
Copy link
Contributor Author

/test macrobenchmark

@google-oss-bot
Copy link
Contributor

@jeremyjiang-dev: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
macrobenchmark 8af227e link /test macrobenchmark

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.

@jeremyjiang-dev jeremyjiang-dev merged commit 9ab737a into master Jun 25, 2021
@jeremyjiang-dev jeremyjiang-dev deleted the perfFrame branch June 25, 2021 14:00
@firebase firebase locked and limited conversation to collaborators Jul 26, 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.

5 participants