Game Development Community

Torquescript profiling ?

by Orion Elenzil · in Torque Game Engine · 11/20/2007 (4:09 pm) · 1 replies

Does anyone know if there's a framework for profiling time spent in script functions ?

i'm thinking something you would use like this:
function mySuspectFunction()
{
    scriptProfiler_Enter();
    // la la la
    for (%n = 1; %n < 10000000000; %n++)
       for (%m = 1; %m < 10000000; %m++)
         expensiveCall();
    scriptProfiler_Leave();
}

and then have a way to dump out the total time spent inside mySuspectFunction().


.. actually i'm thinking of something which would even tally up the time spent inside each Call Stack for each function. ie, if you discover that a function like this is taking up oodles of total time:
function mySimpleFunctionThatICallAllOverThePlace()
{
   // do something simple
}

it doesn't do you a whole lot of good w/o knowing where it's being called from.

anyhow.

exists ?
maybe it's part of torsion ?

#1
11/20/2007 (4:11 pm)
I should mention that i can easily see how to implement what i describe above,
but it relies on a few custom functions such as getScopeName().