-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: mobile app profiling metrics (#7660)
Co-authored-by: Liza Mock <liza.mock@sentry.io> Co-authored-by: Shana Matthews <shana.l.matthews@gmail.com>
- Loading branch information
1 parent
9cc69c4
commit 1d55231
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+161 KB
src/docs/product/profiling/mobile-app-profiling/flamechart-with-gpu-overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion
4
...roduct/profiling/mobile-app-profiling.mdx → .../profiling/mobile-app-profiling/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/docs/product/profiling/mobile-app-profiling/metrics.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Metrics | ||
sidebar_order: 50 | ||
redirect_from: | ||
- /profiling/mobile-app-profiling/metrics/ | ||
description: "Measurements taken by the Sentry profiler that help us contextualize the work your mobile app does and detect possible issues impacting performance." | ||
--- | ||
|
||
The Sentry profiler records several system measurements to help analyze the backtraces it gathers. Some, like CPU and heap usage, are taken on a regular sampling interval using functions from `mach/mach.h`, albeit with a lower frequency than backtrace sampling. Others, like GPU information, are taken from `CADisplayLink` callback invocations, as they're received. | ||
|
||
## CPU Usage | ||
|
||
The amount of CPU used by the app process, (as a scaled percentage of total CPU capacity, which varies depending on the number of cores), is measured every 100 ms. The value is calculated using `thread_info` with `THREAD_BASIC_INFO`, which returns a CPU usage value per thread and sums up the values for all current threads. | ||
|
||
## Heap Usage | ||
|
||
The amount of heap memory used by the application is recorded every 100 ms using `task_info` with `TASK_VM_INFO`. | ||
|
||
## GPU Information | ||
|
||
In addition to counting the number of [slow and frozen UI frame renders](/product/performance/mobile-vitals/#slow-and-frozen-frames) for Mobile Vitals, Sentry now records the timestamp for every frame and overlays it on top of profiling flame charts: | ||
|
||
![Sentry displays slow and frozen frames above the flamechart of a particular profile.](./flamechart-with-gpu-overlay.png) | ||
|
||
The profiler records the current frame rate upon start, and then any time it changes, (for example if a user puts their device into low-power mode). | ||
|
||
## Energy Usage | ||
|
||
The amount of energy expended by CPU work allocated to the app process is calculated every 100 ms using `task_info` with `TASK_POWER_INFO_V2`. |
1d55231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sentry-docs – ./
sentry-docs-git-master.sentry.dev
docs.sentry.io
sentry-docs.sentry.dev