1 8 9 package com.sleepycat.je; 10 11 import java.io.Serializable ; 12 13 import com.sleepycat.je.utilint.DbLsn; 14 15 19 public class EnvironmentStats implements Serializable { 20 21 22 27 private int splitBins; 28 29 34 private int dbClosedBins; 35 36 40 private int cursorsBins; 41 42 46 private int nonEmptyBins; 47 48 52 private int processedBins; 53 54 58 private int inCompQueueSize; 59 60 61 62 65 private int nEvictPasses; 66 67 70 private long nNodesSelected; 71 72 76 private long nNodesScanned; 77 78 81 private long nNodesExplicitlyEvicted; 82 83 86 private long nBINsStripped; 87 88 91 private long requiredEvictBytes; 92 93 94 95 98 private int nCheckpoints; 99 100 103 private long lastCheckpointId; 104 105 108 private int nFullINFlush; 109 110 113 private int nFullBINFlush; 114 115 118 private int nDeltaINFlush; 119 120 123 private long lastCheckpointStart; 124 125 128 private long lastCheckpointEnd; 129 130 131 132 133 private int cleanerBacklog; 134 135 136 private int nCleanerRuns; 137 138 139 private int nCleanerDeletions; 140 141 144 private int nINsObsolete; 145 146 149 private int nINsCleaned; 150 151 155 private int nINsDead; 156 157 160 private int nINsMigrated; 161 162 165 private int nLNsObsolete; 166 167 170 private int nLNsCleaned; 171 172 176 private int nLNsDead; 177 178 181 private int nLNsLocked; 182 183 187 private int nLNsMigrated; 188 189 193 private int nLNsMarked; 194 195 198 private int nLNQueueHits; 199 200 204 private int nPendingLNsProcessed; 205 206 210 private int nMarkedLNsProcessed; 211 212 216 private int nToBeCleanedLNsProcessed; 217 218 222 private int nClusterLNsProcessed; 223 224 228 private int nPendingLNsLocked; 229 230 233 private int nCleanerEntriesRead; 234 235 238 private long cacheDataBytes; private long nNotResident; private long nCacheMiss; private int nLogBuffers; private long bufferBytes; 245 248 private long nFSyncs; private long nFSyncRequests; private long nFSyncTimeouts; 258 private long nRepeatFaultReads; 259 260 264 private long nTempBufferWrites; 265 266 273 private long nRepeatIteratorReads; 274 275 278 public EnvironmentStats() { 279 reset(); 280 } 281 282 285 private void reset() { 286 splitBins = 0; 288 dbClosedBins = 0; 289 cursorsBins = 0; 290 nonEmptyBins = 0; 291 processedBins = 0; 292 inCompQueueSize = 0; 293 294 nEvictPasses = 0; 296 nNodesSelected = 0; 297 nNodesScanned = 0; 298 nNodesExplicitlyEvicted = 0; 299 nBINsStripped = 0; 300 requiredEvictBytes = 0; 301 302 nCheckpoints = 0; 304 lastCheckpointId = 0; 305 nFullINFlush = 0; 306 nFullBINFlush = 0; 307 nDeltaINFlush = 0; 308 lastCheckpointStart = DbLsn.NULL_LSN; 309 lastCheckpointEnd = DbLsn.NULL_LSN; 310 311 cleanerBacklog = 0; 313 nCleanerRuns = 0; 314 nCleanerDeletions = 0; 315 nINsObsolete = 0; 316 nINsCleaned = 0; 317 nINsDead = 0; 318 nINsMigrated = 0; 319 nLNsObsolete = 0; 320 nLNsCleaned = 0; 321 nLNsDead = 0; 322 nLNsLocked = 0; 323 nLNsMigrated = 0; 324 nLNsMarked = 0; 325 nLNQueueHits = 0; 326 nPendingLNsProcessed = 0; 327 nMarkedLNsProcessed = 0; 328 nToBeCleanedLNsProcessed = 0; 329 nClusterLNsProcessed = 0; 330 nPendingLNsLocked = 0; 331 nCleanerEntriesRead = 0; 332 333 cacheDataBytes = 0; 335 nNotResident = 0; 336 nCacheMiss = 0; 337 nLogBuffers = 0; 338 bufferBytes = 0; 339 340 nFSyncs = 0; 342 nFSyncRequests = 0; 343 nFSyncTimeouts = 0; 344 nRepeatFaultReads = 0; 345 nTempBufferWrites = 0; 346 nRepeatIteratorReads = 0; 347 } 348 349 353 public long getBufferBytes() { 354 return bufferBytes; 355 } 356 357 361 public int getCursorsBins() { 362 return cursorsBins; 363 } 364 365 369 public int getDbClosedBins() { 370 return dbClosedBins; 371 } 372 373 377 public int getInCompQueueSize() { 378 return inCompQueueSize; 379 } 380 381 385 public long getLastCheckpointId() { 386 return lastCheckpointId; 387 } 388 389 393 public long getNCacheMiss() { 394 return nCacheMiss; 395 } 396 397 401 public int getNCheckpoints() { 402 return nCheckpoints; 403 } 404 405 409 public int getCleanerBacklog() { 410 return cleanerBacklog; 411 } 412 413 417 public int getNCleanerRuns() { 418 return nCleanerRuns; 419 } 420 421 425 public int getNCleanerDeletions() { 426 return nCleanerDeletions; 427 } 428 429 433 public int getNDeltaINFlush() { 434 return nDeltaINFlush; 435 } 436 437 441 public long getLastCheckpointEnd() { 442 return lastCheckpointEnd; 443 } 444 445 449 public long getLastCheckpointStart() { 450 return lastCheckpointStart; 451 } 452 453 457 public int getNCleanerEntriesRead() { 458 return nCleanerEntriesRead; 459 } 460 461 465 public int getNEvictPasses() { 466 return nEvictPasses; 467 } 468 469 473 public long getNFSyncs() { 474 return nFSyncs; 475 } 476 477 481 public long getNFSyncRequests() { 482 return nFSyncRequests; 483 } 484 485 489 public long getNFSyncTimeouts() { 490 return nFSyncTimeouts; 491 } 492 493 497 public int getNFullINFlush() { 498 return nFullINFlush; 499 } 500 501 505 public int getNFullBINFlush() { 506 return nFullBINFlush; 507 } 508 509 513 public int getNINsObsolete() { 514 return nINsObsolete; 515 } 516 517 521 public int getNINsCleaned() { 522 return nINsCleaned; 523 } 524 525 529 public int getNINsDead() { 530 return nINsDead; 531 } 532 533 537 public int getNINsMigrated() { 538 return nINsMigrated; 539 } 540 541 545 public int getNLNsObsolete() { 546 return nLNsObsolete; 547 } 548 549 553 public int getNLNsCleaned() { 554 return nLNsCleaned; 555 } 556 557 561 public int getNLNsDead() { 562 return nLNsDead; 563 } 564 565 569 public int getNLNsLocked() { 570 return nLNsLocked; 571 } 572 573 577 public int getNLNsMigrated() { 578 return nLNsMigrated; 579 } 580 581 585 public int getNLNsMarked() { 586 return nLNsMarked; 587 } 588 589 593 public int getNLNQueueHits() { 594 return nLNQueueHits; 595 } 596 597 601 public int getNPendingLNsProcessed() { 602 return nPendingLNsProcessed; 603 } 604 605 609 public int getNMarkedLNsProcessed() { 610 return nMarkedLNsProcessed; 611 } 612 613 617 public int getNToBeCleanedLNsProcessed() { 618 return nToBeCleanedLNsProcessed; 619 } 620 621 625 public int getNClusterLNsProcessed() { 626 return nClusterLNsProcessed; 627 } 628 629 633 public int getNPendingLNsLocked() { 634 return nPendingLNsLocked; 635 } 636 637 641 public int getNLogBuffers() { 642 return nLogBuffers; 643 } 644 645 649 public long getNNodesExplicitlyEvicted() { 650 return nNodesExplicitlyEvicted; 651 } 652 653 657 public long getNBINsStripped() { 658 return nBINsStripped; 659 } 660 661 665 public long getRequiredEvictBytes() { 666 return requiredEvictBytes; 667 } 668 669 673 public long getNNodesScanned() { 674 return nNodesScanned; 675 } 676 677 681 public long getNNodesSelected() { 682 return nNodesSelected; 683 } 684 685 689 public long getCacheTotalBytes() { 690 return cacheDataBytes + bufferBytes; 691 } 692 693 697 public long getCacheDataBytes() { 698 return cacheDataBytes; 699 } 700 701 705 public long getNNotResident() { 706 return nNotResident; 707 } 708 709 713 public int getNonEmptyBins() { 714 return nonEmptyBins; 715 } 716 717 721 public int getProcessedBins() { 722 return processedBins; 723 } 724 725 729 public long getNRepeatFaultReads() { 730 return nRepeatFaultReads; 731 } 732 733 737 public long getNTempBufferWrites() { 738 return nTempBufferWrites; 739 } 740 741 745 public long getNRepeatIteratorReads() { 746 return nRepeatIteratorReads; 747 } 748 749 753 public int getSplitBins() { 754 return splitBins; 755 } 756 757 760 public void setCacheDataBytes(long cacheDataBytes) { 761 this.cacheDataBytes = cacheDataBytes; 762 } 763 764 767 public void setNNotResident(long nNotResident) { 768 this.nNotResident = nNotResident; 769 } 770 771 774 public void setNCacheMiss(long nCacheMiss) { 775 this.nCacheMiss = nCacheMiss; 776 } 777 778 781 public void setNLogBuffers(int nLogBuffers) { 782 this.nLogBuffers = nLogBuffers; 783 } 784 785 788 public void setBufferBytes(long bufferBytes) { 789 this.bufferBytes = bufferBytes; 790 } 791 792 795 public void setCursorsBins(int val) { 796 cursorsBins = val; 797 } 798 799 802 public void setDbClosedBins(int val) { 803 dbClosedBins = val; 804 } 805 806 809 public void setInCompQueueSize(int val) { 810 inCompQueueSize = val; 811 } 812 813 816 public void setLastCheckpointId(long l) { 817 lastCheckpointId = l; 818 } 819 820 823 public void setNCheckpoints(int val) { 824 nCheckpoints = val; 825 } 826 827 830 public void setCleanerBacklog(int val) { 831 cleanerBacklog = val; 832 } 833 834 837 public void setNCleanerRuns(int val) { 838 nCleanerRuns = val; 839 } 840 841 844 public void setNCleanerDeletions(int val) { 845 nCleanerDeletions = val; 846 } 847 848 851 public void setNDeltaINFlush(int val) { 852 nDeltaINFlush = val; 853 } 854 855 858 public void setLastCheckpointEnd(long lsn) { 859 lastCheckpointEnd = lsn; 860 } 861 862 865 public void setLastCheckpointStart(long lsn) { 866 lastCheckpointStart = lsn; 867 } 868 869 872 public void setNCleanerEntriesRead(int val) { 873 nCleanerEntriesRead = val; 874 } 875 876 879 public void setNEvictPasses(int val) { 880 nEvictPasses = val; 881 } 882 883 886 public void setNFSyncs(long val) { 887 nFSyncs = val; 888 } 889 890 893 public void setNFSyncRequests(long val) { 894 nFSyncRequests = val; 895 } 896 897 900 public void setNFSyncTimeouts(long val) { 901 nFSyncTimeouts = val; 902 } 903 904 907 public void setNFullINFlush(int val) { 908 nFullINFlush = val; 909 } 910 911 914 public void setNFullBINFlush(int val) { 915 nFullBINFlush = val; 916 } 917 918 921 public void setNINsObsolete(int val) { 922 nINsObsolete = val; 923 } 924 925 928 public void setNINsCleaned(int val) { 929 nINsCleaned = val; 930 } 931 932 935 public void setNINsDead(int val) { 936 nINsDead = val; 937 } 938 939 942 public void setNINsMigrated(int val) { 943 nINsMigrated = val; 944 } 945 946 949 public void setNLNsObsolete(int val) { 950 nLNsObsolete = val; 951 } 952 953 956 public void setNLNsCleaned(int val) { 957 nLNsCleaned = val; 958 } 959 960 963 public void setNLNsDead(int val) { 964 nLNsDead = val; 965 } 966 967 970 public void setNLNsLocked(int val) { 971 nLNsLocked = val; 972 } 973 974 977 public void setNLNsMigrated(int val) { 978 nLNsMigrated = val; 979 } 980 981 984 public void setNLNsMarked(int val) { 985 nLNsMarked = val; 986 } 987 988 991 public void setNLNQueueHits(int val) { 992 nLNQueueHits = val; 993 } 994 995 998 public void setNPendingLNsProcessed(int val) { 999 nPendingLNsProcessed = val; 1000 } 1001 1002 1005 public void setNMarkedLNsProcessed(int val) { 1006 nMarkedLNsProcessed = val; 1007 } 1008 1009 1012 public void setNToBeCleanedLNsProcessed(int val) { 1013 nToBeCleanedLNsProcessed = val; 1014 } 1015 1016 1019 public void setNClusterLNsProcessed(int val) { 1020 nClusterLNsProcessed = val; 1021 } 1022 1023 1026 public void setNPendingLNsLocked(int val) { 1027 nPendingLNsLocked = val; 1028 } 1029 1030 1033 public void setNNodesExplicitlyEvicted(long l) { 1034 nNodesExplicitlyEvicted = l; 1035 } 1036 1037 1040 public void setRequiredEvictBytes(long l) { 1041 requiredEvictBytes = l; 1042 } 1043 1044 1047 public void setNBINsStripped(long l) { 1048 nBINsStripped = l; 1049 } 1050 1051 1054 public void setNNodesScanned(long l) { 1055 nNodesScanned = l; 1056 } 1057 1058 1061 public void setNNodesSelected(long l) { 1062 nNodesSelected = l; 1063 } 1064 1065 1068 public void setNonEmptyBins(int val) { 1069 nonEmptyBins = val; 1070 } 1071 1072 1075 public void setProcessedBins(int val) { 1076 processedBins = val; 1077 } 1078 1079 1082 public void setNRepeatFaultReads(long val) { 1083 nRepeatFaultReads = val; 1084 } 1085 1086 1089 public void setNTempBufferWrites(long val) { 1090 nTempBufferWrites = val; 1091 } 1092 1093 1096 public void setNRepeatIteratorReads(long val) { 1097 nRepeatIteratorReads = val; 1098 } 1099 1100 1103 public void setSplitBins(int val) { 1104 splitBins = val; 1105 } 1106 1107 1111 public String toString() { 1112 StringBuffer sb = new StringBuffer (); 1113 sb.append("splitBins=").append(splitBins).append('\n'); 1114 sb.append("dbClosedBins=").append(dbClosedBins).append('\n'); 1115 sb.append("cursorsBins=").append(cursorsBins).append('\n'); 1116 sb.append("nonEmptyBins=").append(nonEmptyBins).append('\n'); 1117 sb.append("processedBins=").append(processedBins).append('\n'); 1118 sb.append("inCompQueueSize=").append(inCompQueueSize).append('\n'); 1119 1120 sb.append("nEvictPasses=").append(nEvictPasses).append('\n'); 1122 sb.append("nNodesSelected=").append(nNodesSelected).append('\n'); 1123 sb.append("nNodesScanned=").append(nNodesScanned).append('\n'); 1124 sb.append("nNodesExplicitlyEvicted="). 1125 append(nNodesExplicitlyEvicted).append('\n'); 1126 sb.append("nBINsStripped=").append(nBINsStripped).append('\n'); 1127 sb.append("requiredEvictBytes=").append(requiredEvictBytes). 1128 append('\n'); 1129 1130 sb.append("nCheckpoints=").append(nCheckpoints).append('\n'); 1132 sb.append("lastCheckpointId=").append(lastCheckpointId).append('\n'); 1133 sb.append("nFullINFlush=").append(nFullINFlush).append('\n'); 1134 sb.append("nFullBINFlush=").append(nFullBINFlush).append('\n'); 1135 sb.append("nDeltaINFlush=").append(nDeltaINFlush).append('\n'); 1136 sb.append("lastCheckpointStart="). 1137 append(DbLsn.getNoFormatString(lastCheckpointStart)).append('\n'); 1138 sb.append("lastCheckpointEnd="). 1139 append(DbLsn.getNoFormatString(lastCheckpointEnd)).append('\n'); 1140 1141 sb.append("cleanerBacklog=").append(cleanerBacklog).append('\n'); 1143 sb.append("nCleanerRuns=").append(nCleanerRuns).append('\n'); 1144 sb.append("nCleanerDeletions=").append(nCleanerDeletions).append('\n'); 1145 sb.append("nINsObsolete=").append(nINsObsolete).append('\n'); 1146 sb.append("nINsCleaned=").append(nINsCleaned).append('\n'); 1147 sb.append("nINsDead=").append(nINsDead).append('\n'); 1148 sb.append("nINsMigrated=").append(nINsMigrated).append('\n'); 1149 sb.append("nLNsObsolete=").append(nLNsObsolete).append('\n'); 1150 sb.append("nLNsCleaned=").append(nLNsCleaned).append('\n'); 1151 sb.append("nLNsDead=").append(nLNsDead).append('\n'); 1152 sb.append("nLNsLocked=").append(nLNsLocked).append('\n'); 1153 sb.append("nLNsMigrated=").append(nLNsMigrated).append('\n'); 1154 sb.append("nLNsMarked=").append(nLNsMarked).append('\n'); 1155 sb.append("nLNQueueHits="). 1156 append(nLNQueueHits).append('\n'); 1157 sb.append("nPendingLNsProcessed="). 1158 append(nPendingLNsProcessed).append('\n'); 1159 sb.append("nMarkedLNsProcessed="). 1160 append(nMarkedLNsProcessed).append('\n'); 1161 sb.append("nToBeCleanedLNsProcessed="). 1162 append(nToBeCleanedLNsProcessed).append('\n'); 1163 sb.append("nClusterLNsProcessed="). 1164 append(nClusterLNsProcessed).append('\n'); 1165 sb.append("nPendingLNsLocked="). 1166 append(nPendingLNsLocked).append('\n'); 1167 sb.append("nCleanerEntriesRead="). 1168 append(nCleanerEntriesRead).append('\n'); 1169 1170 sb.append("nNotResident=").append(nNotResident).append('\n'); 1172 sb.append("nCacheMiss=").append(nCacheMiss).append('\n'); 1173 sb.append("nLogBuffers=").append(nLogBuffers).append('\n'); 1174 sb.append("bufferBytes=").append(bufferBytes).append('\n'); 1175 sb.append("cacheDataBytes=").append(cacheDataBytes).append('\n'); 1176 sb.append("cacheTotalBytes=").append(getCacheTotalBytes()). 1177 append('\n'); 1178 sb.append("nFSyncs=").append(nFSyncs).append('\n'); 1179 sb.append("nFSyncRequests=").append(nFSyncRequests).append('\n'); 1180 sb.append("nFSyncTimeouts=").append(nFSyncTimeouts).append('\n'); 1181 sb.append("nRepeatFaultReads=").append(nRepeatFaultReads).append('\n'); 1182 sb.append("nTempBufferWrite=").append(nTempBufferWrites).append('\n'); 1183 sb.append("nRepeatIteratorReads="). 1184 append(nRepeatIteratorReads).append('\n'); 1185 1186 return sb.toString(); 1187 } 1188} 1189 | Popular Tags |