sendRequestStatistics

sendRequestStatistics(localOrRemote: Integer);

The sendRequestStatistics method of the Process class requests a target process to send a notification containing local or remote request statistics.

The target process can be any current process, including the requesting process itself or a process executing on another node.

The target object for the notification is the Process instance of the process making the request.

To request local statistics, which record information about requests made on the node on which the process is running, set the value of the localOrRemote parameter to one (1). To request remote statistics, which record information about requests made between the client node and the database server node, set the value of the localOrRemote parameter to two (2).

Most of the request statistics are collected only when node sampling is active on the node. The values that are reported independent of node sampling are the thin client statistics that are part of the local request statistics.

The target process is temporarily activated or interrupted to send the notification. After sending the notification, it resumes whatever it was previously doing.

This method is asynchronous; that is, the sendRequestStatistics method does not wait until the statistics have been received. The statistics are received as a notification some time after the sendRequestStatistics method has been called.

The information in the notification relating to the request statistics is shown in the following table.

Parameter Contains …
eventType Process_Local_Stats_Event for local request statistics Process_Remote_Stats_Event for remote request statistics
target Process instance of the process that made the request
userInfo Statistical values encoded within a Binary value

The process making the request should register to receive type Process_Local_Stats_Event (local request statistics) or Process_Remote_Stats_Event (remote request statistics) notifications on its Process instance using the beginNotification method defined in the Object class before executing the sendRequestStatistics method, as shown in the following code fragment.

self.beginNotification(process, Process_Local_Stats_Event,
                       Response_Continuous, 0);

To test whether a notification contains local or remote request statistical information, the userNotification method of its Process instance should test whether the value of the eventType parameter is Process_Local_Stats_Event or Process_Remote_Stats_Event, which indicates a local or remote request statistics notification.

The userInfo parameter of the notification should then be passed as a parameter to the extractRequestStatistics method, to extract the local and remote request statistics as attributes in a JadeDynamicObject instance.

If the target process (the method receiver) is not a valid current process, an 1128 exception (The target process is not valid) is raised.