Collecting msproftx Data

To locate performance bottlenecks of an application or an upper-layer framework program, you can use specific APIs to track event durations during application execution and save them to the profile data file.

You can use the mstx or msproftx API for profiling. The mstx API is recommended.

Prerequisites

Call the mstx or msproftx API in the user application code to record the time span of specific events during application execution.

Command Format

Log in to the operating environment and run the following command:

msprof [options] <app>
Or msprof [options] --application=<app>

To collect mstx data, the user application must be passed. For details about the app parameters, see app Parameters. For details about the options parameters, see Command-line Options.

Command-line Options

Example

Log in to the operating environment and run the following command in any directory:
msprof --msproftx=on /home/projects/MyApp/out/main

Find the PROF_XXX directory generated in the directory specified by --output to store the automatically-parsed profile data. For details about the result files, see msproftx Data Description and MSTX_EVENTS table of the .db file.