What is collected
Application launch time
Launch is measured in two steps, because “launched” means two different things:- Time to initial display is the time from process start to your first rendered frame. It is collected automatically, with no configuration.
- Time to full display is the time until the screen is actually useful, which only your code knows. Report it when the first screen has its data:
Frame rate and slow frames
The SDK samples the display refresh rate continuously and reports the average and minimum for each view, along with a flag for views that rendered slowly. ProMotion displays are normalized to a 60 Hz ceiling, so a 120 Hz device does not look twice as good as a 60 Hz one. Slow frames are reported separately and precisely. A frame that arrives at least one frame interval late is recorded with its start and duration, which is what lets you find the exact moment a scroll stuttered:Long tasks
A long task is a block of the main thread long enough to delay rendering. The default threshold is 100 ms:nil to turn long tasks off. A long task over 700 ms is also counted as a frozen frame.
Long tasks and app hangs measure the same thing at different scales. Long tasks are frequent and cheap to collect, while hangs are rarer, come with a stack trace, and tell you where the block happened. Use long tasks to see how often it happens and hangs to find out why.
CPU and memory
CPU ticks and the memory footprint are sampled on a timer and reported per view as an average and a maximum. The sampling period followsvitalsUpdateFrequency:
.rare when you want the shape of the data at the lowest cost, and .frequent only while investigating something specific. Rate metrics such as CPU per second need a view that lasted at least a second, so very short views report counts but no rates.
Time to network settled
This is the time from a screen appearing until the requests that make up its initial load have finished. The SDK decides which requests count as “initial” with a predicate, and by default a request counts if it starts within 100 ms of the view starting. That default misses screens that begin loading later, for example after refreshing a token or resolving a cache. Widen the window:Interaction to next view
This is the time between a user’s last interaction on one screen and the next screen starting, which is how a slow navigation shows up as the user experienced it. By default the SDK anchors the metric to a tap, click, or swipe that happened within three seconds of the new view:nil turns the metric off. To exclude specific interactions, implement the predicate:
Record your own timings
A custom timing records how long something in the current view took, measured from when the view started:_, ., @, $, and - are replaced with an underscore.
Platform support
Next steps
- Report hangs and crashes with Error Tracking.
- See which requests a slow screen is waiting on with Network Tracking.
- Review the rest of the options in Configuration Options.