Main Content

getProfilerData

Download profiler data from target computer

Description

getProfilerData(target_object) downloads the profiler data for the most recent loaded application from the Speedgoat® target computer to the MATLAB® development computer.

The maximum log file size for the profiler data is 1024 MB.

example

getProfilerData(target_object,app_name) downloads the profiler data for the real-time application app_name from the target computer to the development computer.

getProfilerData(target_object,app_name,fileName) downloads the profiler data for the real-time application app_name from the target computer and saves it as a PERF file with the filename fileName to the development computer.

Examples

collapse all

Load the slrt_ex_osc application on the target computer and download the profiler data.

Open, build, and download the real-time application.

tg = slrealtime;
modelSTF = getSTFName(tg);
modelName = "slrt_ex_osc";
openExample(modelName);
set_param(modelName,"SystemTargetFile",modelSTF);
slbuild(modelName);
load(tg,modelName);

Download the profiler data for the most recent loaded application.

getProfilerData(tg);

MATLAB downloads and saves the available profiler data as profilingData_app_name.perf in the current path.

To generate profiler data for the slrt_ex_osc application, start the profiler before starting the application.

startProfiler(tg);
start(tg);

Stop the profiler and stop the application.

stopProfiler(tg);
stop(tg);

Download the profiler data for the slrt_ex_osc application.

getProfilerData(tg,"slrt_ex_osc");

The profiler data for the slrt_ex_osc application is saved as profilingData_slrt_ex_osc.perf in the current MATLAB path.

Download the profiler data for the slrt_ex_osc application and save it to the file slrt_ex_osc_profiler_data.perf in the current path.

getProfilerData(tg,"slrt_ex_osc","slrt_ex_osc_profiler_data");

Input Arguments

collapse all

Object that represents target computer, specified as a Target object. The object provides access to methods that manipulate the target computer properties.

Example: tg

Real-time application MLDATX file name that you build from the model, specified as a character vector or string scalar.

Example: "slrt_ex_osc"

File name for the profiler data, specified as a character vector or string scalar. By default, Simulink Real-Time saves the profiler data with the file name profilingData_app_name.perf.

Example: "slrt_ex_osc_profiler_data"

Version History

Introduced in R2020b

expand all