# Activate the timing trace
Call ACTIVE From TIMING
# Your code
...
#Stop and read the timing trace
Call ARRET from TIMING
——如果你的代码需要在批次服务器或者经由web service执行:
# The following statement start the timing trace an 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 by 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
如果你想分析生成的文件,则可以使用这种代码:
Call LECTURE(filpath("!tmp",GUSER,"tra","","",""),2) From TIMING