1 21 22 package org.apache.derby.impl.services.cache; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 class CacheStat { 27 28 31 protected int findHit; 32 protected int findMiss; 33 protected int findFault; 34 protected int findCachedHit; 35 protected int findCachedMiss; 36 protected int create; 37 protected int ageOut; 38 protected int cleanAll; 39 protected int remove; 40 protected long initialSize; 41 protected long maxSize; 42 protected long currentSize; 43 44 protected long[] data; 45 46 public long[] getStats() 47 { 48 if (data == null) 49 data = new long[14]; 50 51 data[0] = findHit + findMiss; 52 data[1] = findHit; 53 data[2] = findMiss; 54 data[3] = findFault; 55 data[4] = findCachedHit + findCachedMiss; 56 data[5] = findCachedHit; 57 data[6] = findCachedMiss; 58 data[7] = create; 59 data[8] = ageOut; 60 data[9] = cleanAll; 61 data[10] = remove; 62 data[11] = initialSize; 63 data[12] = maxSize; 64 data[13] = currentSize; 65 66 return data; 67 } 68 69 public void reset() 70 { 71 findHit = 0; 72 findMiss = 0; 73 findFault = 0; 74 findCachedHit = 0; 75 findCachedMiss = 0; 76 create = 0; 77 ageOut = 0; 78 cleanAll = 0; 79 remove = 0; 80 } 81 } 82 | Popular Tags |