Product Information > JADE Object Manager Guide > Chapter 4 - JADE System Instrumentation and Diagnosis > ProcesssendRequestStatistics Method
Process::sendRequestStatistics Method
sendRequestStatistics(localOrRemote: Integer);

The Process class sendRequestStatistics method requests a process to send a notification containing local or remote request statistics. The process is indicated by the Process instance used as the method receiver.

You can specify any current process to send statistics, including the requesting process itself and processes executing on other nodes.

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

To request local statistics that record information about requests made on the node on which the process is running, set the value of the localOrRemote parameter to 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 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 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, the process resumes the inactive state or restarts the interrupted action.

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 or Process_Remote_Stats_Event global constant in the JadeProcessEvents category
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, Remote_Proc_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 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 statistics as properties in a JadeDynamicObject instance.

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