Commit Graph

101 Commits (9654b4dfb122b54b04369fe80a2f9c95811478e8)

Author SHA1 Message Date
Gabriel Luong 9654b4dfb1 For #27667 - Remove import-ordering from the list of disabled ktlint rules 2 years ago
mcarare 6913cd59c9 For #27541: Update AndroidX Annotation to latest version.
Add AndroidX Annotation as a direct dependency to app build.gradle.
Update imports for annotations moved to Companion Object.
2 years ago
Gregory Mierzwinski 5e60cea503
Bug 1791998 - Disable TCP popup when running performance tests. (#27451)
* Disable TCP popup when running performance tests.

* Run some perf tests.

* Undo testing changes.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2 years ago
mcarare ffcef5ff2e For #26844: Fix ktlint issues and remove them from baseline. 2 years ago
Mugurell 1332d408da For #26380 - Wait in tests until telemetry is recorded. 2 years ago
Jan-Erik Rediger 06488cdabe Move startup perf measurements to a background thread
This is required to avoid loading the Glean core library (provided by libxul) early on.
Fenix needs to do the time measurement itself for now.
2 years ago
Marc Leclair 0680d7027c Fixed PR review 2 years ago
Marc Leclair 0da739930c Lint fixes 2 years ago
Marc Leclair 2a83d029c8 Added ProfilerUtils 2 years ago
Marc Leclair c0a95805aa Added ProfilerReusableComposable 2 years ago
Marc Leclair b08058e2bd Added ProfilerStopDialogFragment 2 years ago
Michael Comella 985f4ede00 Added ProfilerStartDialogFragment. 2 years ago
Marc Leclair 09a31e03ab For #14854: Added ProfilerViewModel 2 years ago
Jan-Erik Rediger ba7028ec6a Upgrade to Glean v50 and adopt new Glean APIs 2 years ago
Grisha Kruglov 8de4c0b4db For #22569: Remove allopen plugin and Mockable annotations 3 years ago
Sebastian Kaspari 8c9f0c835a Closes #21695: ThreadPenaltyDeathWithIgnoresListener: Ignore stack traces containing InstrumentationHooks class 3 years ago
Michael Comella 7d67b84a92 For #22177: add SearchDialogFragmentConstraintLayout; has markers.
Here's a profile with these changes: https://share.firefox.dev/3vTpZha
3 years ago
Michael Comella bc6d8be9c1 For #22177: change onMeasure/onLayout markers into a single track + draw.
When you want to look at one of these markers, you usually want to look
at all three so I found that having them on a single track was easier to
follow. Since they run in sequence, they should never overlap and that
should minimize confusion.
3 years ago
Michael Comella ed8f2c0bc3 For #22177: rename RootLinearLayout -> HomeActivityRoot...
This is so we can be more specific with the detail text in our markers.
3 years ago
Michael Comella 0c079fde91 Closes #22213: add marker for LayoutInflater.inflate.
Here is a profile with this change: https://share.firefox.dev/3mlQSHu
3 years ago
Michael Comella ec1a25dfcf For #21921 - post: switch generic marker skip to BaseBrowserFragment.
Since we instrument the marker with the duration in BaseBrowserFragment,
we should skip on BaseBrowserFragment too, not its subclass,
BrowserFragment.
3 years ago
Michael Comella 788eb2c5de For #21921: add duration for some BrowserFragment lifecycle markers.
Here is a sample profile with all the new markers:
https://share.firefox.dev/3lCGoD2
3 years ago
Michael Comella 3a3c39406a For #21921: add durations for some HomeFragment lifecycle markers. 3 years ago
Michael Comella f65ea1e972 For #21921: add and register MarkersFragmentLifecycleCallbacks. 3 years ago
Michael Comella 99533626f1 For #21921: rename MarkersLifecycleCallbacks to ...ActivityLifecycle...
This is to disamibugate with the MarkersFragmentLifecycleCallbacks that
we'll be adding.
3 years ago
Michael Comella 623914bd89 For #22054: add marker for root view layout/measure.
The onLayout marker may be redundant to onGlobalLayout marker but I'm not
sure yet so let's leave them both in and observe if that's the case.

Here's a profile with the markers: https://share.firefox.dev/3lZaOQb
3 years ago
Michael Comella 0faa61b744 No issue: use Fact.value as detailText for markers.
This allows Facts emitted from ac to provide more details in markers.
3 years ago
Michael Comella 2c528391da Closes #21424: add marker for StrictMode.resetAfter.
This helps identify file IO. Unfortunately, with this marker, it's
difficult to separate code we own from code we don't own. However, I
wasn't sure what the best implementation would be to address that
(e.g. ideally, we would ignore violations in code we don't own rather than
annotate the markers) so I thought we can land it this simple way and
improve it incrementally.
3 years ago
Gabriel Luong 04e75ace19 For #21756 - Refactor TopSites out of home.sessioncontrol 3 years ago
Michael Comella 3ab1ca8321 For #21126: process performancetest intent for AC too. 3 years ago
Michael Comella 7232fedb20 For #21296: add ProfilerMarkers.addForDispatchTouchEvent. 3 years ago
Michael Comella bb632c7b3b For #21299: add duration markers for HomeActivity Create/Start.
We only instrument these methods because they're the only ones that
noticeably long running in the current implementation.
3 years ago
Michael Comella d67bd65f19 For #21299: add duration marker for IntentReceiverActivity.onCreate.
We only instrument onCreate because it's the only one with an
implementation.

While declaring this as a function that accepts a lambda is less
fragile, we've previously had issues with it such as suspected memory
leaks when used for telemetry. Therefore, we go with the simpler
approach.
3 years ago
Michael Comella f8a4113271 For #21299: add markers for all activity lifecycle callbacks.
We implement these all in the same track because between it'd create a
lot noise between this and fragment lifecycle callbacks.
3 years ago
Michael Comella e6560c229d For #21309: add profiler markers on global layout. 3 years ago
Michael Comella 4fe6a4506d For #21183: remove lazyMonitored wrapper functionality.
We're not using the functionality so there's no sense in doing the work.
However, we keep the wrapper: see the code comments for details.
3 years ago
Rohan Maity 707918cdc1 For #20596 remove startup timeline probes 3 years ago
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Sebastian Kaspari 8b5aef7def Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 3 years ago
Michael Comella be64ee4159 For #20127: remove app_opened_all_startup integration. 3 years ago
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
Sebastian Kaspari 84f4ff0d86 Issue #17819: Update detekt to 1.17.1 3 years ago
Michael Comella d6999234b0 For #18836: add & integrate StartupTypeTelemetry. 3 years ago
Michael Comella a64540bd06 For #18836: add StartupPathProvider + tests. 3 years ago
Michael Comella ec65737cbb For #18836: address lint errors for StartupStateProvider*. 3 years ago
Michael Comella ea1d569837 For #18836: add getStartupStateForStartedActivity method. 3 years ago
Michael Comella 18507ec24c For #18836: add isHotStartForStartedActivity and tests. 3 years ago
Michael Comella e803cc61a2 For #18836: add isWarmStartForStartedActivity, tests. 3 years ago
Michael Comella ed1f38611f For #18836: shorten isColdStart... and rm questionable test.
The test failed with the rewrite of the code because it violates
one of our assumptions that only one Activity will be started. However,
since it doesn't rely on observed behavior and we made up the events,
it's value is questionable so it seems okay to remove, especially for
the gain of conciseness in the code.
3 years ago
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For #16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For #16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago