getRequestStats

getRequestStats(jdo: JadeDynamicObject input);

The getRequestStats method of the Node class returns node statistics relating to persistent database requests from the receiving node that is the method receiver.

The values are returned as Integer64 properties in the dynamic object specified by the jdo parameter.

The calling process is responsible for creating and deleting the JadeDynamicObject instance.

The node statistics are held on the database server node and relate to persistent object requests received from the node specified as the method receiver. For details about the properties returned in the dynamic object, see "Node::getRequestStats Method" in Chapter 4 of the JADE Object Manager Guide.

The calling process is responsible for creating and deleting the JadeDynamicObject instance. Properties are added to the object when the method is first called. The object can then be used in subsequent calls.

If the dynamic object passed to the method already contains properties that do not match the properties to be returned, the existing dynamic object properties are removed and replaced with the appropriate properties. The method is most efficient when the properties match those to be returned.

The cumulative counter values are not reset during the lifetime of the database server node, and you may need to compare values from one execution of the getRequestStats method with previous values to work out the differences.

The cumulative values are held as 64-bit unsigned integers, which are copied to the dynamic object as Integer64 values. The maximum value before they wrap around to negative values is therefore 2^63 - 1 (approximately 8 Exabytes).

The following example shows the use of the getRequestStats method.

showNodeRequestStats();
vars
   jdo : JadeDynamicObject;
begin
   create jdo transient;
   node.getRequestStats(jdo);
   write jdo.display;
epilog
   delete jdo;
end;

The output from the getRequestStats method shown in the previous example is as follows.

---NodeStatistics(104)---
committedTransactions = 43
abortedTransactions = 0
getObjects = 10173
createObjects = 363
deleteObjects = 136
updateObjects = 526
lockObjects = 15588
unlockObjects = 6797
beginNotifications = 537
endNotifications = 52
serverMethodExecutions = 0
causeEvents = 60