1 8 9 package com.sleepycat.je; 10 11 15 public class BtreeStats extends DatabaseStats { 16 17 18 private long binCount; 19 20 21 private long dbinCount; 22 23 24 private long deletedLNCount; 25 26 27 private long dupCountLNCount; 28 29 32 private long inCount; 33 34 38 private long dinCount; 39 40 41 private long lnCount; 42 43 44 private int mainTreeMaxDepth; 45 46 47 private int duplicateTreeMaxDepth; 48 49 50 private long[] insByLevel; 51 52 53 private long[] binsByLevel; 54 55 56 private long[] dinsByLevel; 57 58 59 private long[] dbinsByLevel; 60 61 65 public long getBottomInternalNodeCount() { 66 return binCount; 67 } 68 69 72 public void setBottomInternalNodeCount(long val) { 73 binCount = val; 74 } 75 76 80 public long getDuplicateBottomInternalNodeCount() { 81 return dbinCount; 82 } 83 84 87 public void setDuplicateBottomInternalNodeCount(long val) { 88 dbinCount = val; 89 } 90 91 95 public long getDeletedLeafNodeCount() { 96 return deletedLNCount; 97 } 98 99 102 public void setDeletedLeafNodeCount(long val) { 103 deletedLNCount = val; 104 } 105 106 110 public long getDupCountLeafNodeCount() { 111 return dupCountLNCount; 112 } 113 114 117 public void setDupCountLeafNodeCount(long val) { 118 dupCountLNCount = val; 119 } 120 121 125 public long getInternalNodeCount() { 126 return inCount; 127 } 128 129 132 public void setInternalNodeCount(long val) { 133 inCount = val; 134 } 135 136 140 public long getDuplicateInternalNodeCount() { 141 return dinCount; 142 } 143 144 147 public void setDuplicateInternalNodeCount(long val) { 148 dinCount = val; 149 } 150 151 155 public long getLeafNodeCount() { 156 return lnCount; 157 } 158 159 162 public void setLeafNodeCount(long val) { 163 lnCount = val; 164 } 165 166 170 public int getMainTreeMaxDepth() { 171 return mainTreeMaxDepth; 172 } 173 174 177 public void setMainTreeMaxDepth(int val) { 178 mainTreeMaxDepth = val; 179 } 180 181 185 public int getDuplicateTreeMaxDepth() { 186 return duplicateTreeMaxDepth; 187 } 188 189 192 public void setDuplicateTreeMaxDepth(int val) { 193 duplicateTreeMaxDepth = val; 194 } 195 196 200 public long[] getINsByLevel() { 201 return insByLevel; 202 } 203 204 207 public void setINsByLevel(long[] insByLevel) { 208 this.insByLevel = insByLevel; 209 } 210 211 215 public long[] getBINsByLevel() { 216 return binsByLevel; 217 } 218 219 222 public void setBINsByLevel(long[] binsByLevel) { 223 this.binsByLevel = binsByLevel; 224 } 225 226 230 public long[] getDINsByLevel() { 231 return dinsByLevel; 232 } 233 234 237 public void setDINsByLevel(long[] dinsByLevel) { 238 this.dinsByLevel = dinsByLevel; 239 } 240 241 245 public long[] getDBINsByLevel() { 246 return dbinsByLevel; 247 } 248 249 252 public void setDBINsByLevel(long[] dbinsByLevel) { 253 this.dbinsByLevel = dbinsByLevel; 254 } 255 256 private void arrayToString(long[] arr, StringBuffer sb) { 257 for (int i = 0; i < arr.length; i++) { 258 long count = arr[i]; 259 if (count > 0) { 260 sb.append(" level ").append(i); 261 sb.append(": count=").append(count).append("\n"); 262 } 263 } 264 } 265 266 270 public String toString() { 271 StringBuffer sb = new StringBuffer (); 272 if (binCount > 0) { 273 sb.append("numBottomInternalNodes="); 274 sb.append(binCount).append("\n"); 275 arrayToString(binsByLevel, sb); 276 } 277 if (inCount > 0) { 278 sb.append("numInternalNodes="); 279 sb.append(inCount).append("\n"); 280 arrayToString(insByLevel, sb); 281 } 282 if (dinCount > 0) { 283 sb.append("numDuplicateInternalNodes="); 284 sb.append(dinCount).append("\n"); 285 arrayToString(dinsByLevel, sb); 286 } 287 if (dbinCount > 0) { 288 sb.append("numDuplicateBottomInternalNodes="); 289 sb.append(dbinCount).append("\n"); 290 arrayToString(dbinsByLevel, sb); 291 } 292 sb.append("numLeafNodes=").append(lnCount).append("\n"); 293 sb.append("numDeletedLeafNodes="). 294 append(deletedLNCount).append("\n"); 295 sb.append("numDuplicateCountLeafNodes="). 296 append(dupCountLNCount).append("\n"); 297 sb.append("mainTreeMaxDepth="). 298 append(mainTreeMaxDepth).append("\n"); 299 sb.append("duplicateTreeMaxDepth="). 300 append(duplicateTreeMaxDepth).append("\n"); 301 302 return sb.toString(); 303 } 304 } 305 | Popular Tags |