2006 Aug 08 2:00 PM
Hi,
I am trying to analyse the CPU time taken for a "DO" statement using SE30.I want to compare this with the CPU time taken for a "WHILE" statement with the same logic.But when I execute for the "DO" statement multiple times I am getting different results each time which are highly varying.I am not sure which is the reliable or correct data.Hence could not further compare with the "WHILE" statement.
Cud someone suggest me how to compare performance with this?
Thanks in advance,
Hema.
Hi,
I am trying to analyse the CPU time taken for a "DO" statement using SE30.I want to compare this with the CPU time taken for a "WHILE" statement with the same logic.But when I execute for the "DO" statement multiple times I am getting different results each time which are highly varying.I am not sure which is the reliable or correct data.Hence could not further compare with the "WHILE" statement.
Cud someone suggest me how to compare performance with this?
Thanks in advance,
Hema.
2006 Aug 08 2:04 PM
u can try this
v_time1 = sy-uzeit.
do.
enddo.
v_time2 = sy-uzeit.
dif = v_time2 - v_tim1.
2006 Aug 08 2:08 PM
Hi hema,
1. I am getting different results each time
This is very much normal.
bcos the speed very much depends
upon the load on the server, at that particular point of time.
2. We can also measure in another way, programmatically.
3.
GET TIME. "- for refreshing the time value.
T1 = SY-UZEIT.
DO.
*--- CODE
ENDDO.
GET TIME. "- again for refreshing the time value.
T2 = SY-UZEIT.
diff = T2 - T1. "GET DIFF IN SECONDS.
WRITE DIFF.
regards,
amit m.
2006 Aug 08 2:13 PM
I think the best way to compare is trigger both the pgms at the same time and then check the cpu times.
Regards
Anurag
2006 Aug 08 2:33 PM
Use statement GET RUN TIME in the program to get runtime of individual statement processing times instead of SE30.
Get run time also returns different times, take average
Try the following code.
data: rt1 type i.
get run time field rt1.
do 100 times.
....
....
enddo.
get run time field rt1.
write:/ rt1.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |