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

feat(android): handle warm launches that are lukewarm #1268

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

abhaysood
Copy link
Contributor

@abhaysood abhaysood commented Sep 19, 2024

Description

Improve warm launch tracking by differentiating lukewarm launches.

Schema changes

  1. Certain warm launch events (lukewarm) were being attributed as cold launch before Attribute launch as "warm" instead of "cold", when the launched activity has saved state #1246. Now they are tracked as warm launch, but there is no way to differentiate them from a normal warm launch. Introduce a new field warm_launch.is_lukewarm to indicate this.

  2. Add the following timings to allow calculation of lukewarm launch time in future. Currently this data will be used for studying the patterns.

  • warm_launch.process_start_uptime
  • warm_launch.process_start_requested_uptime
  • warm_launch.content_provider_attach_uptime

Metric calculation changes

Discard lukewarm launch events from warm_launch duration metric calculation. These will mostly be much higher than normal warm launch events and will skew the metric.

Log anomalous warm launch events

Warm launch events where: is_lukewarm = false and app_visible_uptime = 0 aren't expected. However, such cases might still come up in production, log such cases for future improvements.

closes: #1254
closes: #1180

@abhaysood abhaysood added feature new features android android related labels Sep 19, 2024
@abhaysood abhaysood self-assigned this Sep 19, 2024
Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
measure-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:22am

* Discard lukewarm launch from warm launch duration compute.
* Log anomalous warm launch events for future improvements.
@abhaysood abhaysood force-pushed the launch-tracker-improvements branch from 2255283 to 152aba7 Compare September 23, 2024 05:48
@abhaysood abhaysood requested a review from detj September 23, 2024 06:00
@abhaysood abhaysood added the backend backend related label Sep 23, 2024
@abhaysood abhaysood changed the title feat(android); add support for lukewarm launch feat(android): add support for lukewarm launch Sep 23, 2024
@abhaysood abhaysood changed the title feat(android): add support for lukewarm launch feat(android): differentiate warm launches that are lukewarm Sep 23, 2024
@abhaysood abhaysood changed the title feat(android): differentiate warm launches that are lukewarm feat(android): handle warm launches that are lukewarm Sep 23, 2024
- update session data with a non-lukewarm warm_launch event
- update validation for warm_launch event
- update query for getting launch metrics
- update log of anomalous warm_launch duration
Update last app visible state each time instead
of waiting for cold launch, otherwise, app visible
uptime is always unavailable for lukewarm launch.
@abhaysood abhaysood merged commit 4b08805 into main Sep 23, 2024
12 of 13 checks passed
@abhaysood abhaysood deleted the launch-tracker-improvements branch September 23, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android android related backend backend related feature new features
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve warm launch tracking NullPointerException in LaunchTracker.kt
2 participants