#turbo 80
|#turbo 60
|#turbo 40
|#turbo 20
Sub Main
/declare StartTime float outer ${MacroQuest.Running}
/declare CurrentTime float outer ${MacroQuest.Running}
/declare i int local
/declare x int local
/mqlog ${Me.Class} StartTime = ${MacroQuest.Running}
/echo Standard int declare check
/for i 1 to 2000
/declare var${i} int outer ${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Standard int declare check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo /Call int declare check
/for i 1 to 2000
/call Test1 ${var${i}}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} /call int declare check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Ini write speed check
/for i 1 to 2000
/ini "Diagnostic.ini" "Test" "Test${i}" "${i}"
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Ini write speed check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Ini /varset read speed check
/for i 1 to 2000
/varset var${i} ${Ini[Diagnostic.ini,Test,Test${i}]}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Ini /varset read speed check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Single /if check - 5 variables
/for i 1 to 2000
/if (${i}>1000 && ${i}>1200 && ${i}>1400 && ${i}>1600 && ${i}>1800) /varset x ${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Single /if check - 5 variables - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Multiple /if checks - 5 variables
/for i 1 to 2000
/if (${i}>1000) {
/if (${i}>1200) {
/if (${i}>1400) {
/if (${i}>1600) {
/if (${i}>1800) /varset x ${i}
}
}
}
}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Multiple /if check - 5 variables - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Multiple /if checks + /goto - 5 variables
/for i 1 to 2000
/if (${i}<1000) /goto :skipgoto1
/if (${i}<1200) /goto :skipgoto1
/if (${i}<1400) /goto :skipgoto1
/if (${i}<1600) /goto :skipgoto1
/if (${i}<1800) /goto :skipgoto1
:skipgoto1
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Multiple /if check + /goto - 5 variables - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Multiple /if checks + /goto + ini - 5 variables
/for i 1 to 2000
/if (${Ini[Diagnostic.ini,Test,Test${i}]}<1000) /goto :skipgoto2
/if (${Ini[Diagnostic.ini,Test,Test${i}]}<1200) /goto :skipgoto2
/if (${Ini[Diagnostic.ini,Test,Test${i}]}<1400) /goto :skipgoto2
/if (${Ini[Diagnostic.ini,Test,Test${i}]}<1600) /goto :skipgoto2
/if (${Ini[Diagnostic.ini,Test,Test${i}]}<1800) /goto :skipgoto2
:skipgoto2
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Multiple /if check + /goto - 5 variables - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo /goto speed check
/for i 1 to 2000
/if (${i}>1) /goto :skipgoto3
:skipgoto3
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} /goto speed check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo /call speed check
/for i 1 to 2000
/if (${i}>1) /call Test2
:skipgoto
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} /call speed check - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Single /if check - 1 variable
/for i 1 to 2000
/if (${i}) /varset x ${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Single /if check - 1 variable - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Single /if check - 1 variable from ini
/for i 1 to 2000
/if (${Ini[Diagnostic.ini,Test,Test${i}]}) /varset x ${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Single /if check - 1 variable from ini - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo String declare - 2 variables - 1 variable from ini
/for i 1 to 2000
/declare String1${i} string outer ${Ini[Diagnostic.ini,Test,Test${i}]}
/declare String2${i} string outer String2${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} String declare - 2 variables - 1 variable from ini - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Array declare - 2 variables - 1 variable from ini
/declare StringArray[2000,2] string outer 0
/for i 1 to 2000
/varset StringArray[${i},1] ${Ini[Diagnostic.ini,Test,Test${i}]}
/varset StringArray[${i},2] String2${i}
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Array declare - 2 variables - 1 variable from ini - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Timer declare - 1 variable from ini
/for i 1 to 2000
/declare Timer${i} timer outer ${Ini[Diagnostic.ini,Test,Test${i}]}s
/next i
/mqlog ${Me.Class} ${If[${Foreground},Foreground,BackGround]} Timer declare - 1 variable from ini - ${Math.Calc[${MacroQuest.Running}-${CurrentTime}]}ms
/varset CurrentTime ${MacroQuest.Running}
/echo Diagnostic finished
/mqlog ${Me.Class} TotalTime=${Math.Calc[${MacroQuest.Running}-${StartTime}]}ms
/return
Sub Test1(int test1)
/declare Test${test1} int outer ${test1}
/return
Sub Test2
/return