profiler_stopΒΆ

profiler_stop stops the profiler that has been started with the profiler_start function. The profiler can be used for analyzing the run-time behavior and performance of programs.

smRet = profiler_stop()
smRet = profiler_stop(ssFile)
smRet = profiler_stop(ssFile, rsMinTime)
smRet = profiler_stop(ssFile, rsMinTime, bDontOpenDialog)

Return Value

smRet is a string matrix with three columns. The fist column contains the function name, the second columns contains the number of calls and the third column the run times for the function calls in seconds. In case of an error the return value is an empty string "".

Parameters

ssFile

ssFile is a file name with a path. The profiler will write the result into the file. If the file extension is .xls or .xlsx an Excel file will be created.

rsMinTime

Times smaller than rsMinTime will not be written. Default is 0.0.

bDontOpenDialog

If bDontOpenDialog is TRUE (1) the dialog box is not displayed. (Default value is FALSE (0)).

Example

profiler_start();
sin(1);
for (i in 1:1000) cos(1);
profiler_stop(GetUserDirectory() + "profiler.txt");
../../_images/profiler.png

id-983384