The Return-time and Timing-precision options can be used to determine the amount of time needed to process a request and its response from the perspective of the client. If Return-time requests such timing, up to five timestamps are returned in Time1 through Time5. The determination of which timestamps are returned and to which points in the processing they apply are platform-dependent. The returned Time1-status through Time5-status values indicate which Time values are valid. Each Time is four bytes long and contains an unsigned binary timestamp.
- Time1 is set when TDP accepts a request from CLIv2
- Time2 is set when a request is passed to the database
- Time3 is set when the response is received from the database
- Time4 is set when the response leaves TDP
- Time5 is set when the response is placed into the CLIv2 response buffer.
The difference between two timestamps represents the elapsed time between the two points in processing. The precision for the timestamps is indicated by Timing-precision. On mainframe-connected systems, timestamps are formed by manipulating the IBM standard Time-of-Day (TOD) clock as indicated by the following Assembler code:
STCK area LM R0,R1,area SR R15,R15 IC R15,DBCITSP SRDL R0,12(R15) ST R1,DBCTIMEn
- 'V' if the timestamp is valid
- 'O' if the timestamp overflowed four-bytes
- A ‘space’ or ‘binary zero’ if the timestamp is not valid