Skip to content
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

[Formula Android] Add event listener to track performance. #313

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

Laimiux
Copy link
Collaborator

@Laimiux Laimiux commented Nov 30, 2023

What

Adding EventListener with onFeatureInitialized, onViewInflated, onRendered callbacks to understand performance of each function.

@Laimiux Laimiux force-pushed the laimonas/formula-fragment-operation-listener branch from 66bf74d to 8b30740 Compare November 30, 2023 20:04
@carrotkite
Copy link

JaCoCo Code Coverage 79.51% ✅

Class Covered Meta Status
com/instacart/formula/android/FragmentEnvironment 100% 0%
com/instacart/formula/android/FeatureView 100% 0%
com/instacart/formula/android/FormulaFragment 79% 0%
com/instacart/formula/android/internal/FormulaFragmentViewFactory 50% 0%
com/instacart/formula/android/internal/FeatureBinding 100% 0%
com/instacart/formula/android/internal/FragmentFlowRenderView 76% 0%
com/instacart/formula/android/internal/FormulaFragmentDelegate 41% 0%
com/instacart/formula/FormulaAndroid 37% 0%
com/instacart/formula/android/views/FeatureViewBindFunction 50% 0%

Generated by 🚫 Danger

Copy link
Collaborator

@alexanderbezverhni alexanderbezverhni left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏼

@@ -47,6 +45,22 @@ object FormulaAndroid {
FormulaFragmentDelegate.fragmentEnvironment = fragmentEnvironment
}

/**
* Initializes Formula Android integration. Should be called within [Application.onCreate].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it need to be called before the DI injection call in [Application.onCreate]? If yes - might be worth mentioning it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not necessary because usually, the logic will not run until a fragment is shown.

reports.html.enabled = false
// reports.html.enabled = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Accidental?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, needed to debug a failure

@Laimiux Laimiux force-pushed the laimonas/formula-fragment-operation-listener branch from 8b30740 to 5677405 Compare November 30, 2023 20:48
@Laimiux Laimiux merged commit 1da9a35 into master Nov 30, 2023
5 checks passed
@Laimiux Laimiux deleted the laimonas/formula-fragment-operation-listener branch November 30, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants