BEGIN
  
RECORD NOALIAS (SD.GetArchRowCol_Ref) _data
 RECORD (SD.GetArchRowCol_Ref)  _ref
 ALIAS (SD._System_Proces)  _Aref
 
 RECORD (SD._System_Proces)  _sysProc
 
 TIME _bt
 TIME _et
 INT _step
 INT _retCode
 TIME _currTime 
 
 REAL _value
 
 INT _col
 INT _row
 
 INT _begin
 INT _end
 REAL _duration
 REAL _duration1
 REAL _duration2
 INT _loop
 REAL _improvement
 
 _currTime := SysTime
 _bt := %AddIntervalLocal(_currTime, -1*%ModTime(_currTime, 3600))
 ;_bt := %AddIntervalLocal(_bt, -24*3600*7)
 _et := %AddIntervalLocal(_bt, 3600)
 _step := 0
 
 DO_LOOP
   _duration1 := 0
   FOR _loop = 1 TO 10 DO_LOOP
     _begin := 0
     GETARCHSTRUCT SV._System_Proces, _sysProc, _bt, _retCode
     _end := 0
     _duration1 := _duration1 + (_end\TIM - _begin\TIM)
   END_LOOP
 
   _duration2 := 0
   FOR _loop = 1 TO 10 DO_LOOP
     _begin := 0
     FOR _row = 1 TO SV._System_Proces\DIM DO_LOOP
       FOR _col = 1 TO SV._System_Proces\CNR DO_LOOP
         GETARCHVAL _value, SV._System_Proces[ _row]^_col, _bt
       END_LOOP
     END_LOOP
     _end := 0
     _duration2 := _duration2 + ( _end\TIM - _begin\TIM)
   END_LOOP
 
   _duration1 := _duration1 / 10.0
   _duration2 := _duration2 / 10.0
   U.Duration_ROWCOL := _duration1 TIME _duration1\TIM
   U.Duration_VAL := _duration2  TIME _duration1\TIM
 
   U.Duration_improvement := _duration2 / _duration1 TIME _duration1\TIM
 END_LOOP
 
 GETARCHSTRUCT H._System_Proces, _sysProc, _bt, _retCode
 
 SET _Aref AS SV._System_Proces
 GETARCHSTRUCT _Aref, _sysProc, _bt, _retCode
 
 
 U.Count := U.Count + 1
 SET _ref^I1 AS Hour
 SET _ref^I2 AS Min
 SET _ref^I3 AS Sec
 SET _ref^I4 AS SysTime
 
 
 GETARCHROW _ref[1], _data, _bt, _et, _step, 30000, _retCode
 GETARCHROW SV.GetArchRowCol_Ref[1], _data, _bt, _et, _step, 30000, _retCode
 GETARCHROW H.GetArchRowCol_Ref[1], _data, _bt, _et, _step, 30000, _retCode
 
 REDIM _ref[4]
 SET _ref[1]^I1 AS Hour
 SET _ref[2]^I1 AS Min
 SET _ref[3]^I1 AS Sec
 SET _ref[4]^I1 AS SysTime
 
 GETARCHCOL _ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYROW
 GETARCHCOL SV.GetArchRowCol_Ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYROW
 GETARCHCOL H.GetArchRowCol_Ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYROW
 GETARCHCOL H.GetArchRowCol_Ref_Col_I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYROW
 
 
 GETARCHCOL _ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYCOL
 GETARCHCOL SV.GetArchRowCol_Ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYCOL
 GETARCHCOL H.GetArchRowCol_Ref[0]^I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYCOL
 GETARCHCOL H.GetArchRowCol_Ref_Col_I1, _data, _bt, _et, _step, 30000, _retCode TIMEBYCOL

END

Related pages:

Napíšte komentár