Hi,

I was looking for MATLAB timing profile from OCTAVE, but didn't find.

Then I made a plan to measure OCTAVE timings. Several alternatives were 
found:

1) Inserting

     t(linenum, callcounter) = clock();

    timelines in the code. This works, but isn't automatic, so big files 
cause lots of additional work done.

2) Inserting

     t(linenum, callcounter) = clock();

    timelines in the code AUTOMATICALLY before actually calling the scripts 
or functions.

    Then you get:


       myfunction.m  ----> modified myfunction.m including timelines.

    This also works, but needs a facility to maintain timelines in m-files. 
An easy automatic code looks for suitable lines in the m-file and inserts a 
timeline everywhere.

    However, this modifies m-files, which isn't very good thing in the long 
run.

3) Could simulate OCTAVE engine and call eval for every octave code fraction 
with timing measurement:

     octaveline   ---->       eval ( 'timestart; octaveline ; timestop;')

    this also works, but simulation can become rather complicated trying to 
do all the same things as octave engine does.

4) Could dispatch octave engine "eval"-functionality to include timing start 
and stop around executed code.
    How this can be done? eval is a builtin function in octave. And timing 
results need to be collected also.

5) Can find out average times for every octave action during eval and report 
results as estimations of algorithm times.
    This is not exact, but gives a good view of timings in an algorithm.
    This works, but isn't automatic, so big files cause lots of additional 
work done. And exceptional timings are not found this way.

6) Could try to use external facilities to measure timing points to octave 
engine proceedings. Works and shows code location timings, but since code 
location contents are not exactly known and can ever vary, isn't the best 
possible way to measure octave timings.


Is MATLAB profile on/off available for octave somewhere outside octave 
pages? It wasn't mentioned in octave manuals.

Sincerely

Jari-Pekka Ikonen

email: [email protected]

Reply via email to