1. Script performance measurement

    Article: AN0001895Updated: 03.10.2018

    When optimizing system performance it is useful to measure speed of script execution. This can be facilitated by the object OG.Utils.CreateStopWatch.

    Example:

    var sw =OG.Utils.CreateStopwatch();
    sw.Start();

    //measured script sequence

    sw.Stop();

    //log entry
    OG.Log.Write('Elapsed time (hh:mm:ss):' + sw.Elapsed);
    OG.Log.Write('Elapsed time (ms):' + sw.ElapsedMilliseconds);

×