/// AUTORUN

debug minimal;
scriptcache removefunction LOAD_TEST quiet_fail; // TODO: If <{scriptcache.has_function[LOAD_TEST]}>
function define LOAD_TEST
{
    debug minimal; // Was this needed to mark I forget
    define count 100000;
    set LOAD_TEST_TEMP_COUNTER 0;
    define time_start <{util.current_time_utc.total_milliseconds}>;
    repeat <{var[count]}>
    {
        set LOAD_TEST_TEMP_COUNTER <{cvar[LOAD_TEST_TEMP_COUNTER].value_number.add[1]}>;
    }
    define time_end <{util.current_time_utc.total_milliseconds}>;
	// TODO: Reduce need for to_number here
    echo "Completed<{text_color.emphasis}> <{cvar[LOAD_TEST_TEMP_COUNTER]}> <{text_color.base}>loops in<{text_color.emphasis}> <{var[time_end].to_number.subtract[<{var[time_start]}>]}> <{text_color.base}>milliseconds!";
}
echo "Load test loaded! Enter command '<{text_color.emphasis}>call run LOAD_TEST<{text_color.base}>' to run it!";

/// AUTORUN

debug minimal;
scriptcache removefunction LOAD_TEST quiet_fail; // TODO: If <{scriptcache.has_function[LOAD_TEST]}>
function define LOAD_TEST
{
    debug minimal; // Was this needed to mark I forget
    define count 100000;
    set LOAD_TEST_TEMP_COUNTER 0;
    define time_start <{util.current_time_utc.total_milliseconds}>;
    repeat <{var[count]}>
    {
		define x <{cvar[LOAD_TEST_TEMP_COUNTER].value_number}>;
		define y <{var[x].add[1]}>;
        set LOAD_TEST_TEMP_COUNTER <{var[y]}>;
    }
    define time_end <{util.current_time_utc.total_milliseconds}>;
    echo "Completed<{text_color.emphasis}> <{cvar[LOAD_TEST_TEMP_COUNTER]}> <{text_color.base}>loops in<{text_color.emphasis}> <{var[time_end].subtract[<{var[time_start]}>]}> <{text_color.base}>milliseconds!";
}
echo "Load test loaded! Enter command '<{text_color.emphasis}>call run LOAD_TEST<{text_color.base}>' to run it!";

Improve the load test script
Improve the load test script
