sendMethodCacheStatistics

sendMethodCacheStatistics() serverExecution;

The sendMethodCacheStatistics method of the Process class requests a target process (the receiver) to send a notification containing statistics about the method cache of the target process.

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

To retrieve the method cache statistics information and send the notifications, the target process is activated temporarily or interrupted, after which it resumes whatever it was doing.

The sendMethodCacheStatistics method is asynchronous; that is, it does not wait until the information is received. The information is received through notifications sometime after the method is called.

The information in the notification relating to the method cache for the target process is shown in the following table.

Parameter Contains …
eventType Process_Method_Cache_Stats_Event global constant
target Process instance of the process that made the request
userInfo Method cache statistics stored within a string value

The process making the request should register to receive type Process_Method_Cache_Stats_Event notifications on its Process instance, using the beginNotification method defined in the Object class before executing the sendMethodCacheStatistics method, as shown in the following code fragment.

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

To determine whether a notification contains method cache statistics, the userNotification method of its Process instance should test whether the value of the eventType parameter is Process_Method_Cache_Stats_Event.

The following is an example of the userInfo output.

OID: 187.2
Process method cache type: Multiple (Separate per process)
Cache limit: 524288
Maximum cache size: 524288
Number of methods in cache: 105
Total methods discarded: 2560
Total methods executed: 190586
Total time loading methods into cache (ms): 2237
Cache overruns: 0
String pool limit: 5242880
Maximum string pool size: 173568
Number of Strings in string pool: 234
String pool overruns: 0
Number of cache overruns 0-10% over limit: 0
Number of cache overruns 10-20% over limit: 0
Number of cache overruns 20-30% over limit: 0
Number of cache overruns 30-40% over limit: 0
Number of cache overruns 40-50% over limit: 0
Number of cache overruns 50-60% over limit: 0
Number of cache overruns 60-70% over limit: 0
Number of cache overruns 70-80% over limit: 0
Number of cache overruns 80-90% over limit: 0
Number of cache overruns 90-100% over limit: 0
Number of cache overruns 100%+ over limit: 0
[187.2:1:1]