Comments (7)
I'm looking for a way to measure the App start time without using test credentials or something.
For the vast majority of apps, the scenario would be
First time launch -> login page -> home -> Second time launch -> Home Page.
We would be making different API calls and different flows between the first and second-time launch.
I think for this we need to look for a solution without clearing application data.
from performance-samples.
There are multiple ways to achieve this.
- Log in each time by providing a test user account in your benchmark test.
- Provide an intent which is available for testing and launch the benchmark with that intent rather than your main intent.
- Use the
setupBlock
parameter and run through the user flow before running the benchmark.
from performance-samples.
There's a new benchmark to show multiple ways to measure login as described above here.
This only demonstrates how to benchmark the LoginActivity, not any screen when depends on the user being logged in already. As bagadesh outlines above, many apps have Activities which rely on the user being logged in and will crash (or immediately call finish()
upon creation because they expect a valid user to exist.
from performance-samples.
There's a new benchmark to show multiple ways to measure login as described above here.
from performance-samples.
Any updates on this?
We have a similar use case. On the first run, users interact with CMP (consent management platform), based on that some stuff (e.g. firebase crashlytics) gets enabled/disabled - this might affect start times.
The macrobenchmark lib clears user data on each run, meaning the performance is always measured with CMP turned off which is not representative to startup times for real users.
One possible solution would be to pull the default shared preferences from the device and commit it to git. Then we would have some code in the setup that pushes the shared preferences fine to the device.
Is the issue here enough or should we file a ticket on the official issue tracker with the use case?
from performance-samples.
@LouisFn @LordRaydenMK We had the same problem. We used uiautomator library to automatically login and go through the initial user set-up that ultimately launches out main activity. After that, we went ahead and launches a few top screens in our app. Although after the user logs in, the first few screens are rarely used, we couldn't figure out any other way. This way, out baseline profile was almost 6.8 MB which compresses down to 28 KB in total only.
from performance-samples.
There's a new benchmark to show multiple ways to measure login as described above here.
from performance-samples.
Related Issues (20)
- jankFrameListener run 2 times for onCreate HOT 5
- How can you pull the baseline profile in CI? HOT 3
- Getting Could not find com.squareup.okio:okio-bom:2.8.0. HOT 1
- TestRunner: java.lang.IllegalStateException: Perfetto tracing failed to start. HOT 1
- Does matchingFallbacks work if libraries are imported via releaseImplementation and debugImplementation? HOT 2
- Samples doesn't work for dynamic feature modules HOT 4
- Does Baseline Profile just helps with very First launch HOT 1
- [JankStat] [Feature] Provide expectedDuration of Frame in FramaData HOT 1
- java.io.FileNotFoundException - perfetto-trace HOT 2
- Fix GitHub build for macrobenchmark sample
- A question about just one baseline-prof.txt(PR : #258) HOT 4
- Question about the difference in file size inside the aab depending on the location of the generated baseline-prof.txt file
- Fix the GitHub Actions build by not executing benchmarks on an emulator
- Failing to run assembleDebugAndroidTest in MacrobenchmarkSample app
- Why macrobenchmark module's build.gradle has "isDebuggable = true" HOT 1
- Failing tests in the Macrobenchmark sample
- Where and with what name to store the multiple profile HOT 7
- Can only fetch a single baseline profile from Firebase Test Lab
- Add sample for Custom (Async) Trace and TraceMetric
- java.io.FileNotFoundException: http://localhost:9001/status - PerfettoHttpServer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from performance-samples.