- You can use the %PerfTime system variable for determining elapsed time. %PerfTime retrieves the local system clock time (of the application server) by making a system call, and the return time is down to the millisecond. Look at the following simple example where you can determine time taken for the particular PeopleCode program segment.
&Start = %PerfTime; &results = ""; For &I = 1 To &Count; &GnnwgNumber = GetNextNumberWithGapsCommit(QEORDER_DTL.QE_QTY, 999999, 1,⇒ "where QE_ORDER_NBR='GNNWG'"); &results = &results | " : " | &GnnwgNumber; End-For; &End = %PerfTime; &out = "Count = " | &Count | ", total GNNWG time (s) = " | NumberToString⇒ ("%6.3", Value(&End - &Start));
PeopleSoft recommends using %PerfTime when measuring performance time for a specific PeopleCode program. This can enable developers to evaluate which coding logic has better performance time.
- Another option is you can run PeopleSoft SignOn Trace. To get the SignOn tracing options (the signon URL includes the trace directive) In the address bar you can type "http://server:port/psp/ps/?cmd=login&trace=Y". This will show you a page like this. From this page you can specify PeopleCode trace settings. Select Each Statement from Peoplecode Trace Setting and get the trace file generated on your app server. In this trace file you can get the timestamp for each statement in the PeopleCode.
0 comments :
Post a Comment