Skip to content

Fireperf fragments: lifecycle callbacks #3565

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
Mar 21, 2022

Conversation

leotianlizhan
Copy link
Contributor

@leotianlizhan leotianlizhan commented Mar 18, 2022

b/208271814

This PR doesn't include tests to unblock the other implementation tasks, tests will be added in another PR.

EDIT: actually don't see a reason to test because these are just lifecycle callbacks, there's nothing in those callbacks so there's nothing to test.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 18, 2022

Coverage Report 1

Affected Products

  • firebase-perf

    Overall coverage changed from ? (23d1a5e) to 70.70% (ace3a97) by ?.

    98 individual files with coverage change

    FilenameBase (23d1a5e)Merge (ace3a97)Diff
    AddTrace.java?0.00%?
    AndroidApplicationInfo.java?34.71%?
    AndroidApplicationInfoOrBuilder.java?0.00%?
    AndroidLogger.java?100.00%?
    AndroidMemoryReading.java?38.36%?
    AndroidMemoryReadingOrBuilder.java?0.00%?
    ApplicationInfo.java?45.00%?
    ApplicationInfoOrBuilder.java?0.00%?
    ApplicationProcessState.java?73.91%?
    AppStartTrace.java?86.54%?
    AppStateMonitor.java?84.41%?
    AppStateUpdateHandler.java?92.86%?
    Clock.java?100.00%?
    ConfigResolver.java?97.38%?
    ConfigurationConstants.java?99.25%?
    ConfigurationFlag.java?100.00%?
    ConsoleUrlGenerator.java?37.50%?
    Constants.java?95.65%?
    Counter.java?90.91%?
    CpuGaugeCollector.java?92.77%?
    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%?
    FirebasePerformance.java?79.57%?
    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_ProvidesRemoteConfigComponentFactory.java?100.00%?
    FirebasePerformanceModule_ProvidesRemoteConfigManagerFactory.java?100.00%?
    FirebasePerformanceModule_ProvidesSessionManagerFactory.java?100.00%?
    FirebasePerformanceModule_ProvidesTransportFactoryProviderFactory.java?100.00%?
    FirebasePerformance_Factory.java?100.00%?
    FirebasePerfProvider.java?76.92%?
    FirebasePerfRegistrar.java?100.00%?
    FirebasePerfTraceValidator.java?89.01%?
    FirebasePerfUrlConnection.java?44.26%?
    FlgTransport.java?83.33%?
    FragmentStateMonitor.java?0.00%?
    GaugeManager.java?98.43%?
    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%?
    InstrHttpsURLConnection.java?94.32%?
    InstrHttpURLConnection.java?93.42%?
    InstrumentApacheHttpResponseHandler.java?100.00%?
    InstrumentOkHttpEnqueueCallback.java?100.00%?
    InstrURLConnectionBase.java?94.86%?
    LogWrapper.java?23.08%?
    MemoryGaugeCollector.java?91.38%?
    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.22%?
    PerfSessionOrBuilder.java?0.00%?
    Rate.java?100.00%?
    RateLimiter.java?89.83%?
    RemoteConfigManager.java?92.86%?
    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?93.95%?
    URLAllowlist.java?94.44%?
    URLWrapper.java?0.00%?
    Utils.java?78.57%?

Test Logs

Notes

  • Commit (ace3a97) is created by Prow via merging PR base commit (23d1a5e) and head commit (f6f871c).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 18, 2022

Size Report 1

Affected Products

  • firebase-perf

    TypeBase (23d1a5e)Merge (ace3a97)Diff
    aar303 kB304 kB+1.34 kB (+0.4%)
    apk (aggressive)982 kB1.03 MB+43.2 kB (+4.4%)
    apk (release)2.46 MB2.46 MB+556 B (+0.0%)

Test Logs

Notes

  • Commit (ace3a97) is created by Prow via merging PR base commit (23d1a5e) and head commit (f6f871c).

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

@leotianlizhan leotianlizhan changed the base branch from master to perfFragmentsEAP March 18, 2022 20:44

public FragmentStateMonitor(
FragmentActivity activity,
Clock clock,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a clock instance here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because new Trace(...) needs a clock, for making a screen trace

@google-oss-bot
Copy link
Contributor

@leotianlizhan: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
smoke-tests f6f871c link /test smoke-tests

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.

@leotianlizhan
Copy link
Contributor Author

tests failures looks unrelated, seems like it's coming from remote-config, will just merge.

@leotianlizhan leotianlizhan merged commit 6a42873 into perfFragmentsEAP Mar 21, 2022
@leotianlizhan leotianlizhan deleted the perf-fragment-lifecycle branch March 21, 2022 17:59
@leotianlizhan leotianlizhan changed the title Fireperf: fragment lifecycle callbacks Fireperf fragments: lifecycle callbacks Mar 23, 2022
leotianlizhan added a commit that referenced this pull request Apr 7, 2022
* Add fragment trace sampling rate config flag (#3546)

* Fireperf: fragment lifecycle callbacks (#3565)

* onResume and onPause

* copyright

* rename to

* more specific language

* Fireperf fragments: trace creation and adding custom attributes (#3575)

* implementation

* test

* gjf

* ebugfix

* copyright

* add tests

* long name test

* fix test

* change error to warn message

* Fix hasFrameMetricsAggregator's value not being set.

* Fix googleJavaFormat error

* Add frame metrics to fragment traces (#3592)

* Add frame metrics to fragment traces.

* Fix AppStateMonitor.java

* Rename FrameMetrics to PerfFrameMetrics

* Fix screen trace logging by printing the trace name. (#3599)

* Fireperf fragments: sampling (#3588)

* ssample fragment after trace already sampled

* gjf

* tests and qol for immutable bundle

* test names and revert getFloat

* fragment-sampling

* fix test

* separate bucketId checkArguments

* Fireperf fragments eap: change version number (#3604)

* change version number

* changelog

* changelog edit

* Update the gradle properties to match the EAP release branch (#3606)

* Update the gradle properties to match the release branch

* Revert ktx gradle properties

* default no0 sampling rate

* gradle.properties revert

* gradle.properties revert 2

* fix unit tests

* review

Co-authored-by: Visu <[email protected]>
Co-authored-by: Leo Zhan <[email protected]>
@firebase firebase locked and limited conversation to collaborators Apr 21, 2022
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