MetricKit histogrammedApplicationResumeTime meaning

Hi! I've implemented collecting MetricKit data for my app. And I don't understand meaning of histogrammedApplicationResumeTime values from appLaunch metric. I explored data and found, that there are can be really huge values – around hours.

For example, let's see one data snapshot from real user:

It seems unbelievable, that resumeTime takes 10902720ms (1 hour).

We've also built a bar chart per percentiles and it looks crazy: p85 – 1030ms | p95 – 1.52 million ms | p99 – 13.2 million ms (3.5 hours)

Documentation says:

A histogram of the different amounts of time taken to resume the app from the background.

For me it sounds like: time between moment, when user launch app, which is in background mode already, to moment, when app comes to foreground stay.

But the real data shows that it isn't.

Can somebody describe what really means histogrammedApplicationResumeTime metric?

Post not yet marked as solved Up vote post of jastic7 Down vote post of jastic7
1.2k views

Replies

When the user leaves the app but does not close it, the app goes in the background, and when they reopen it, it goes into foreground again without restart. Isn’t this your applicationResumeTime?

This would explain the hours-long times 😉

  • Thanks for your answer! I also thought about this scenario, but wouldn't system kill iOS app in background after some minutes? I can't find 100% proof of background lifetime for modern iOS versions, but in old days it was around 10 minutes, but not hours...

Add a Comment

The resume time is the measured time from when the user taps on your app and your app resumes. Think application/scene delegate callbacks and watchdog terminations. Resuming has to be fast but you get either 10 or 20 seconds to do so before iOS will kill you. The exact 'end' of the measurement is unknown, but think of it as a quality of service measurement on the main thread.

Is this from a single report or are you seeing many reports like this? If just a single report, treat it as an iOS defect of MetricKit / outlier and capture a sysdiagnose for a feedback assistant report if you can.

I had run into something similar where the data didn't look right as was many many magnitudes larger than what I had usually seen and the result was a bug and to file feedback.