getObjectCaches(dynObj: JadeDynamicObject input; cacheType: Integer);
The getObjectCaches method of the Node class retrieves statistics relating to cache activity for the node specified as the method receiver.
The cache statistics values are returned as properties of a
The cumulative counter values are not reset during the lifetime of the database server node, and you need to compare values from one execution of the getObjectCaches 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).
You can use the getObjectCaches method regardless of whether node sampling is enabled.
The cacheType parameter specifies whether information is retrieved from the persistent, transient, or remote transient cache. The retrieved values are listed in the following table.
Value | Description |
---|---|
1 | Persistent cache |
2 | Transient cache |
3 | Remote transient cache (applicable only on server nodes) |
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. For a list and explanations about the properties that are returned by this method, see "
If the dynamic object passed to the method already contains properties but they 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 following example shows the use of the getObjectCaches method.
showCacheStatistics(); vars jdo : JadeDynamicObject; begin create jdo transient; node.getObjectCaches(jdo, 1 /*Persistent*/); write jdo.display; epilog delete jdo; end;
The output from the getObjectCaches method shown in the previous example is as follows.
---CacheStatistics(103)--- clockTicks = 103739652 nodeCPUTime = 7625000 nodeTicks = 452891 cacheType = 1 hits = 310723 misses = 29737 topOfLRUHits = 0 createdBuffers = 29745 cleanSwappedBuffers = 19297 dirtySwappedBuffers = 0 resizedBuffers = 1367 maximumBufferSize = 5000000 totalNumberOfBuffers = 10448 availableBufferSize = 159 maximumOverdraftBufferSize = 2500000 overdraftBufferSize = 0 deadBuffers = 0 totalOperations = 426611 currentOperations = 301982 currentBuffers = 10448 deletedBuffers = 19297 copiedBuffers = 0 newBuffers = 18 fetches = 29727 duplicateFetches = 4662 totalSwaps = 19297 totalOpsWhenSwapped = 124629 minOpsWhenSwapped = 1 maxOpsWhenSwapped = 289 totalAgeWhenSwapped = 2570606545 minAgeWhenSwapped = 104864 maxAgeWhenSwapped = 366995 lruTraversals = 2 totalLruTraversalTicks = 237599 latestLruTraversalTicks = 115197 totalCacheCoherencyNotifications = 0 cacheCoherencyNotificationHits = 0 cacheCoherencyUpdatedObjects = 0 cacheCoherencyObjectHits = 0 cacheCoherencyObjectMisses = 0 cacheCoherencyRangeRequests = 0 nodeLockRemoveRequestsSent = 0 nodeLockRemoveRequestsRcvd = 0 nodeLockSwapOutRequestsSent = 0