Number of Operations run per function/time interval?

Nov 18, 2008 at 6:59pm

Number of Operations run per function/time interval?

Is it possible to find out how many Operations MAX performs within a certain action/function or time interval? I’m interested in streamlining some of my patches, and don’t want to use CPU usage as an indication of performance…

Dumb question?

#40912
Nov 18, 2008 at 7:30pm

not at all! i am interested, too.
jrp

#145221
Nov 18, 2008 at 8:22pm

Here’s a version of a test that we use for the oo objects. It measures the time required to perform X iterations of some process.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 66 140 29 196617 < < 3;
#P newex 66 162 27 196617 i;
#P newex 66 117 27 196617 20;
#N vpatcher 898 215 1221 477;
#P window setfont “Sans Serif” 9.;
#P newex 105 113 44 196617 zl nth 1;
#P newex 105 66 22 196617 b 1;
#P newex 105 91 64 196617 patcherargs;
#P outlet 115 193 15 0;
#N vpatcher 20 74 620 474;
#P window setfont “Sans Serif” 9.;
#P newex 50 50 32 196617 sel 1;
#P message 50 90 14 196617 0;
#P newex 50 70 56 196617 del 19999;
#P newex 50 108 70 196617 s AllTestsOff;
#P inlet 50 30 15 0;
#P connect 0 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 1 0;
#P pop;
#P newobj 131 66 55 196617 p auto-off;
#P newex 50 172 44 196617 timer;
#P newex 50 65 51 196617 qmetro 2;
#P newex 63 144 52 196617 uzi 9999;
#P inlet 50 30 15 0;
#P outlet 50 194 15 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 0 0;
#P connect 3 0 2 0;
#P connect 2 1 4 1;
#P fasten 1 0 8 0 55 57 110 57;
#P connect 8 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 2 1;
#P fasten 2 0 6 0 68 167 120 167;
#P fasten 1 0 5 0 55 54 136 54;
#P pop;
#P newobj 22 67 54 196617 p 999999;
#P bpatcher 22 43 15 15 -35 -82 testtoggle 2;
#N vpatcher 609 508 788 685;
#P inlet 35 47 15 0;
#P outlet 35 104 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 53 46 70 196617 r AllTestsOff;
#P toggle 35 82 15 0;
#P connect 1 0 0 0;
#P connect 3 0 0 0;
#P connect 0 0 2 0;
#P pop;
#BP pop 0;
#P flonum 22 204 39 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P comment 22 224 59 196617 time (ms) to perform X iterations;
#P window linecount 1;
#P comment 82 70 157 196617 arg sets the number of iterations;
#P window linecount 3;
#P comment 105 224 118 196617 to avoid lockups , test will stop automatically after approx 10 seconds;
#P window linecount 4;
#P comment 106 117 74 196617 add your items to test here , triggered by bang input;
#P window linecount 1;
#P comment 47 44 100 196617 start/stop test;
#P connect 6 0 7 0;
#P connect 7 0 5 0;
#P connect 7 1 8 0;
#P connect 8 0 10 0;
#P connect 10 0 9 0;
#P window clipboard copycount 11;

#145222

You must be logged in to reply to this topic.