Profiling

The Momentics IDE for BlackBerry contains tools that you can use to analyze the performance of your app. You can use the toolbar to select an appropriate launch mode (for example, QML Profile, Code Coverage, Memory Analysis, or C/C++ Profile).

You can use the Application Profiler and the Cascades Profiler to examine the overall performance of your apps, without stepping through the source code one line at a time. While a debugger helps you find errors in your code, a profiler identifies areas of your code that could run more efficiently and highlight functions that consume the most CPU time. When you profile your code, the IDE inserts code before each function to gather call information (Call Count instrumentation), or just after each function enters and just before each function exits (Function instrumentation).

Profile a QML project

If you're creating a Cascades project with QML components, you can use the Cascades Profiler. The Cascades Profiler is a tool that lets you profile Cascades QML applications visually.

The Cascades Profiler works only if you run your app on a BlackBerry device or BlackBerry 10 Device Simulator that is running BlackBerry 10 version 10.1 or later. You can't use the Cascades Profiler for earlier OS releases.

The Cascades Profiler shows you information about frame rendering, image loading, loading and compiling of QML files, QML signal handling, and time consumed by running QML bindings. 

Screen showing the QML profiling toolbar in the Momentics IDE.

To use the Cascades Profiler to profile a QML project:

  1. Make sure that your app is showing in the Launch configuration window or select it from the drop-down list.
  2. In the Launch mode drop-down list, select QML Profile.
  3. Click Momentics IDE launch button.

For more information about profiling your QML project, see Using the Cascades Profiler.

Profile a C/C++ project

If you're creating an app in C/C++, you can use the QNX Application Profiler perspective and the Application Profiler tool in the Momentics IDE. The Application Profiler traces execution of your code and provides statistics on how much time your app spends in each function.

Screen showing the C/C++ profiling toolbar in the Momentics IDE.

To use the Application Profiler to profile a C/C++ project:

  1. Make sure that your app is showing in the Launch configuration window or select it from the drop-down list.
  2. In the Launch mode drop-down list, select C/C++ Profile.
  3. Click Momentics IDE launch button.

For more information about configuring your C/C++ project for profiling, see Using the Application Profiler.

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus