App profiling
Identify and troubleshoot app performance issues early in the development cycle.
The performance of your app directly impacts its user experience and adoption. Therefore, it is critical to identify and fix performance issues before the app is released. You can use the App Profiling feature to identify the performance issues in your app early in the development cycle.
There are two types of app profiling:
- Default app profiling: This is enabled by default and is supported only on Android devices. This helps you track the device resource consumption by your app.
-
Detailed app profiling: To enable this, you must set the
appProfiling
capability in your Appium test scripts. It is supported on both Android (version 10.0 to 13.0) and iOS (version 14.0 to 16.0). This capability shows how your app performed against performance metrics such as Frames Per Second (FPS), Application Not Responding (ANR) rate, app & page loading times, device resource usage, and more.
Default app profiling
The default app profiling helps you track where your app is making inefficient use of resources, such as the CPU, memory, battery, and network.
The default app profiling feature is only available for Android tests and is enabled by default.
To access App Profiling, follow these steps:
- Open the App Automate dashboard.
- Locate the build for your app.
You can find the build in the builds list or you can search for the build. - Click the build and then click the desired session.
- Go to the App Profiling tab.
By default, App Profiling shows the following graphical charts for the device resources consumption by the app:
-
CPU usage: Optimizing your app’s CPU usage has many advantages, such as providing a faster and smoother user experience and preserving device battery life. Track the CPU usage(%) by your app on the real devices.
- Memory consumption: Identify memory leaks or memory churn that can lead to app freezes, and even app crashes. Track the memory usage(MB) by your app on the real device.
- Battery usage: Track the effect on battery temperature(°C) and battery charge(%) of the real device by your app.
- Network usage: View the network activity on a timeline, showing data sent/received. This lets you examine how and when your app transfers data, and optimize the underlying code appropriately. Track the network usage(kbps) by your app on the real device.
Detailed app profiling
For a comprehensive app performance report, you must set the appProfiling
capability in your Appium test scripts. This capability gives you a deep insight into how your app performs against performance metrics such as Frames Per Second (FPS), Application Not Responding (ANR) rate, app & page loading times, device resource usage, and more.
You can also download logs and a shareable report that you can use to collaborate and troubleshoot issues with your team.
Detailed app profiling is available only under BrowserStack’s Device Cloud Pro, Device Cloud Pro + Visual Cloud, and Enterprise Pro plans. For more details check out our pricing page. Detailed app profiling is not available for the XCUITest and Espresso frameworks.
Supported OS versions
The appProfiling
capability is supported on the following OS versions:
- Android: version 10.0 to 13.0
- iOS: version 14.0 to 16.0
Set the capability
In your Appium test scripts, set the appProfiling
capability to true
to capture detailed app performance metrics.
Capability | Description | Values |
---|---|---|
appProfiling |
Enable detailed app performance profiling. | true, false Default: false |
Example
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("appProfiling", "true");
var capabilities = {
'bstack:options' : {
"appProfiling" : "true",
},
}
desired_cap = {
'bstack:options' : {
"appProfiling" : "true",
},
}
capabilities = {
'bstack:options' => {
"appProfiling" => "true",
},
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("appProfiling", "true");
Access detailed performance report
You can view the detailed performance metrics for your build using the following:
App Automate dashboard
To view the performance metrics on the App Automate dashboard, follow these steps:
- Open the App Automate dashboard.
- Locate the build for your app.
You can find the build in the builds list or you can search for the build. - Click the build and then click the session that has the App Performance Testing capability set.
- Go to the App Profiling tab.
In the App Profiling tab, you can view the following:
-
PDF Report and raw logs: The performance report in PDF format that you can download to share with your team. Or, you can view the raw logs in JSON format by clicking the three-dot menu beside the PDF Report button.
-
Performance issues: This section highlights the performance metrics that are above the threshold, their user impact, and guidance on how to fix them. It also shows the passed audits for the performance metrics that are below the threshold.
-
Performance metrics list: After the Performance issues sections, you have the list of performance metrics such as app size, UI rendering performance, memory usage, battery and power usage, and more.
-
PDF Report and raw logs: The performance report in PDF format that you can download to share with your team. Or, you can view the raw logs in JSON format by clicking the three-dot menu beside the PDF Report button.
App Profiling V2 REST API
Refer to the App Profiling V2 REST API docs.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!