• 如果你想要测试自己的代码,可以在源代码中插入以下语句:
# Activate the timing trace
Call ACTIVE From TIMING
# Your code
...
#Stop and read the timing trace
Call ARRET from TIMING
[attach]4392[/attach]
• 如果你的代码需要在批次服务器上执行,或者需要通过一项web service执行的话:
# The following statement start the timing trace and log in an intermediate file generated in the runtime tmp directory
# The name of the file is the name of the user used to execute the program
# The second parameter of the function (2) indicates the log of the gosub, replace with 1 if you don't want gosub
Call ACTIVE_MAN(filpath("!tmp",GUSER,"tra","","",""),2) From TIMING
# Your code
...
#Stop the timing trace
#The runtime stop to trace and close the file located in the runtime tmp directory
Call ARRET_MAN From TIMING
This method does not automatically display a log. If you want to analyze the file generated you can use this code :
Call LECTURE(filpath("!tmp",GUSER,"tra","","",""),2) From TIMING
[attach]4393[/attach]