Xamarin Profiler

Profiling in computer programming area is measuring an application's behaviour by collecting values of memory usage, time complexity, CPU usage, and so on. This measurement provides us with a good analysis of the application's usage. With profiling, we can see the overall performance results of an application to a particular method's execution duration.

When we complete an application and submit it to stores, users start to download and use it.

If the application has crashes and errors or bottlenecks, users are likely to abandon it and remove it from their devices.

With this in mind, it's crucial to measure the application's memory, CPU, and network usage to find bottlenecks.

The Xamarin Profiler is a standalone application, and it's integrated with Xamarin Studio and Visual Studio to profile an application.

We need to download and install Xamarin Profiler first; we can find the installer on the Xamarin official website.

Xamarin Profiler provides us a way to profile an Xamarin application from Xamarin Studio or Visual Studio. The Profiler collects and displays information about the app to analyse an application's behavior and usage.

Launching the Profiler

We should launch the Profiler to start collecting data:

  1. First, we need to load a solution inside Xamarin Studio.
  2. Then, click on the Run | Start Profiling menu to open the Profiler.

This launches the Profiler, and automatically starts profiling the application:

Launching the Profiler

We'll select All Profiles from the list and click the Choose button, as shown in the preceding screenshot.

Now we can use the application normally from the emulator. When we end the application, the Xamarin Profiler stops collecting data.

We can view charts about memory usage, allocated objects in memory, and so on.

We can use these charts to understand the bottlenecks of the application, fix them in code, and run the Profiler again to see the positive difference.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.176.254