Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run the profiler from the command line?

I know that I can use the profiler from the GUI

Desktop-> Profiler

Is there any way to run by a command?

like image 819
Andrey Rubshtein Avatar asked Jan 08 '12 20:01

Andrey Rubshtein


2 Answers

You can use the command

profile on

and to stop profiling , you use:

profile off

See documentation for more info.

like image 151
alexsmail Avatar answered Nov 13 '22 05:11

alexsmail


The notation is

profile on
%% your functions here
profile off

Many of the arguments for the command "profile" have a hyphen though, just not on and off. See matlab's documentation. You can also use the command:

profile('info')

to get a structure containing your results, if you're working entirely on the command line, and not using the viewer.

like image 26
hurtstotouchfire Avatar answered Nov 13 '22 06:11

hurtstotouchfire