0001: /*-
0002: * See the file LICENSE for redistribution information.
0003: *
0004: * Copyright (c) 2002,2008 Oracle. All rights reserved.
0005: *
0006: * $Id: EnvironmentStats.java,v 1.43.2.6 2008/01/07 15:14:08 cwl Exp $
0007: */
0008:
0009: package com.sleepycat.je;
0010:
0011: import java.io.Serializable;
0012: import java.text.DecimalFormat;
0013:
0014: import com.sleepycat.je.utilint.DbLsn;
0015:
0016: /**
0017: * Javadoc for this public class is generated
0018: * via the doc templates in the doc_src directory.
0019: */
0020: public class EnvironmentStats implements Serializable {
0021: /* INCompressor */
0022:
0023: /**
0024: * The number of bins encountered by the INCompressor that were split
0025: * between the time they were put on the compressor queue and when
0026: * the compressor ran.
0027: */
0028: private int splitBins;
0029:
0030: /**
0031: * The number of bins encountered by the INCompressor that had their
0032: * database closed between the time they were put on the
0033: * compressor queue and when the compressor ran.
0034: */
0035: private int dbClosedBins;
0036:
0037: /**
0038: * The number of bins encountered by the INCompressor that had cursors
0039: * referring to them when the compressor ran.
0040: */
0041: private int cursorsBins;
0042:
0043: /**
0044: * The number of bins encountered by the INCompressor that were
0045: * not actually empty when the compressor ran.
0046: */
0047: private int nonEmptyBins;
0048:
0049: /**
0050: * The number of bins that were successfully processed by the IN
0051: * Compressor.
0052: */
0053: private int processedBins;
0054:
0055: /**
0056: * The number of entries in the INCompressor queue when the getStats()
0057: * call was made.
0058: */
0059: private int inCompQueueSize;
0060:
0061: /* Evictor */
0062:
0063: /**
0064: * The number of passes made to the evictor.
0065: */
0066: private int nEvictPasses;
0067:
0068: /**
0069: * The accumulated number of nodes selected to evict.
0070: */
0071: private long nNodesSelected;
0072:
0073: /**
0074: * The accumulated number of nodes scanned in order to select the
0075: * eviction set.
0076: */
0077: private long nNodesScanned;
0078:
0079: /**
0080: * The accumulated number of nodes evicted.
0081: */
0082: private long nNodesExplicitlyEvicted;
0083:
0084: /**
0085: * The number of BINs stripped by the evictor.
0086: */
0087: private long nBINsStripped;
0088:
0089: /**
0090: * The number of bytes we need to evict in order to get under budget.
0091: */
0092: private long requiredEvictBytes;
0093:
0094: /* Checkpointer */
0095:
0096: /**
0097: * The total number of checkpoints run so far.
0098: */
0099: private int nCheckpoints;
0100:
0101: /**
0102: * The Id of the last checkpoint.
0103: */
0104: private long lastCheckpointId;
0105:
0106: /**
0107: * The accumulated number of full INs flushed to the log.
0108: */
0109: private int nFullINFlush;
0110:
0111: /**
0112: * The accumulated number of full BINs flushed to the log.
0113: */
0114: private int nFullBINFlush;
0115:
0116: /**
0117: * The accumulated number of Delta INs flushed to the log.
0118: */
0119: private int nDeltaINFlush;
0120:
0121: /**
0122: * The location in the log of the last checkpoint start.
0123: */
0124: private long lastCheckpointStart;
0125:
0126: /**
0127: * The location in the log of the last checkpoint end.
0128: */
0129: private long lastCheckpointEnd;
0130:
0131: /**
0132: * The location of the next entry to be written to the log.
0133: */
0134: private long endOfLog;
0135:
0136: /* Cleaner */
0137:
0138: /** The number of files to be cleaned to reach the target utilization. */
0139: private int cleanerBacklog;
0140:
0141: /** The number of cleaner runs this session. */
0142: private int nCleanerRuns;
0143:
0144: /** The number of cleaner file deletions this session. */
0145: private int nCleanerDeletions;
0146:
0147: /**
0148: * The accumulated number of INs obsolete.
0149: */
0150: private int nINsObsolete;
0151:
0152: /**
0153: * The accumulated number of INs cleaned.
0154: */
0155: private int nINsCleaned;
0156:
0157: /**
0158: * The accumulated number of INs that were not found in the tree anymore
0159: * (deleted).
0160: */
0161: private int nINsDead;
0162:
0163: /**
0164: * The accumulated number of INs migrated.
0165: */
0166: private int nINsMigrated;
0167:
0168: /**
0169: * The accumulated number of LNs obsolete.
0170: */
0171: private int nLNsObsolete;
0172:
0173: /**
0174: * The accumulated number of LNs cleaned.
0175: */
0176: private int nLNsCleaned;
0177:
0178: /**
0179: * The accumulated number of LNs that were not found in the tree anymore
0180: * (deleted).
0181: */
0182: private int nLNsDead;
0183:
0184: /**
0185: * The accumulated number of LNs encountered that were locked.
0186: */
0187: private int nLNsLocked;
0188:
0189: /**
0190: * The accumulated number of LNs encountered that were migrated forward
0191: * in the log.
0192: */
0193: private int nLNsMigrated;
0194:
0195: /**
0196: * The accumulated number of LNs that were marked for migration during
0197: * cleaning.
0198: */
0199: private int nLNsMarked;
0200:
0201: /**
0202: * The accumulated number of LNs processed without a tree lookup.
0203: */
0204: private int nLNQueueHits;
0205:
0206: /**
0207: * The accumulated number of LNs processed because they were previously
0208: * locked.
0209: */
0210: private int nPendingLNsProcessed;
0211:
0212: /**
0213: * The accumulated number of LNs processed because they were previously
0214: * marked for migration.
0215: */
0216: private int nMarkedLNsProcessed;
0217:
0218: /**
0219: * The accumulated number of LNs processed because they are soon to be
0220: * cleaned.
0221: */
0222: private int nToBeCleanedLNsProcessed;
0223:
0224: /**
0225: * The accumulated number of LNs processed because they qualify for
0226: * clustering.
0227: */
0228: private int nClusterLNsProcessed;
0229:
0230: /**
0231: * The accumulated number of pending LNs that could not be locked for
0232: * migration because of a long duration application lock.
0233: */
0234: private int nPendingLNsLocked;
0235:
0236: /**
0237: * The accumulated number of log entries read by the cleaner.
0238: */
0239: private int nCleanerEntriesRead;
0240:
0241: /*
0242: * Cache
0243: */
0244: private long cacheDataBytes; // part of cache consumed by data, in bytes
0245: private long nNotResident; // had to be instantiated from an LSN
0246: private long nCacheMiss; // had to retrieve from disk
0247: private int nLogBuffers; // number of existing log buffers
0248: private long bufferBytes; // cache consumed by the log buffers,
0249: // in bytes
0250: private long adminBytes; // part of cache used by transactions,
0251: // log cleaning metadata, and other
0252: // administrative structures
0253: private long lockBytes; // part of cache used by locks
0254:
0255: /*
0256: * Log activity
0257: */
0258: private long nFSyncs; // Number of fsyncs issued. May be less than
0259: // nFSyncRequests because of group commit
0260: private long nFSyncRequests; // Number of fsyncs requested.
0261: private long nFSyncTimeouts; // Number of group fsync requests that
0262: // turned into singleton fsyncs.
0263: /*
0264: * Number of reads which had to be repeated when faulting in an
0265: * object from disk because the read chunk size controlled by
0266: * je.log.faultReadSize is too small.
0267: */
0268: private long nRepeatFaultReads;
0269:
0270: /*
0271: * Number of times we have to use the temporary marshalling buffer to
0272: * write to the log.
0273: */
0274: private long nTempBufferWrites;
0275:
0276: /*
0277: * Number of times we try to read a log entry larger than the read
0278: * buffer size and can't grow the log buffer to accomodate the large
0279: * object. This happens during scans of the log during activities like
0280: * environment open or log cleaning. Implies that the the read
0281: * chunk size controlled by je.log.iteratorReadSize is too small.
0282: */
0283: private long nRepeatIteratorReads;
0284:
0285: /*
0286: * Approximation of the total log size in bytes.
0287: */
0288: private long totalLogSize;
0289:
0290: /**
0291: * Internal use only.
0292: */
0293: public EnvironmentStats() {
0294: reset();
0295: }
0296:
0297: /**
0298: * Resets all stats.
0299: */
0300: private void reset() {
0301: // InCompressor
0302: splitBins = 0;
0303: dbClosedBins = 0;
0304: cursorsBins = 0;
0305: nonEmptyBins = 0;
0306: processedBins = 0;
0307: inCompQueueSize = 0;
0308:
0309: // Evictor
0310: nEvictPasses = 0;
0311: nNodesSelected = 0;
0312: nNodesScanned = 0;
0313: nNodesExplicitlyEvicted = 0;
0314: nBINsStripped = 0;
0315: requiredEvictBytes = 0;
0316:
0317: // Checkpointer
0318: nCheckpoints = 0;
0319: lastCheckpointId = 0;
0320: nFullINFlush = 0;
0321: nFullBINFlush = 0;
0322: nDeltaINFlush = 0;
0323: lastCheckpointStart = DbLsn.NULL_LSN;
0324: lastCheckpointEnd = DbLsn.NULL_LSN;
0325: endOfLog = DbLsn.NULL_LSN;
0326:
0327: // Cleaner
0328: cleanerBacklog = 0;
0329: nCleanerRuns = 0;
0330: nCleanerDeletions = 0;
0331: nINsObsolete = 0;
0332: nINsCleaned = 0;
0333: nINsDead = 0;
0334: nINsMigrated = 0;
0335: nLNsObsolete = 0;
0336: nLNsCleaned = 0;
0337: nLNsDead = 0;
0338: nLNsLocked = 0;
0339: nLNsMigrated = 0;
0340: nLNsMarked = 0;
0341: nLNQueueHits = 0;
0342: nPendingLNsProcessed = 0;
0343: nMarkedLNsProcessed = 0;
0344: nToBeCleanedLNsProcessed = 0;
0345: nClusterLNsProcessed = 0;
0346: nPendingLNsLocked = 0;
0347: nCleanerEntriesRead = 0;
0348:
0349: // Cache
0350: cacheDataBytes = 0;
0351: nNotResident = 0;
0352: nCacheMiss = 0;
0353: nLogBuffers = 0;
0354: bufferBytes = 0;
0355:
0356: // Log
0357: nFSyncs = 0;
0358: nFSyncRequests = 0;
0359: nFSyncTimeouts = 0;
0360: nRepeatFaultReads = 0;
0361: nTempBufferWrites = 0;
0362: nRepeatIteratorReads = 0;
0363: totalLogSize = 0;
0364: }
0365:
0366: /**
0367: * Javadoc for this public method is generated via
0368: * the doc templates in the doc_src directory.
0369: */
0370: public long getBufferBytes() {
0371: return bufferBytes;
0372: }
0373:
0374: /**
0375: * Javadoc for this public method is generated via
0376: * the doc templates in the doc_src directory.
0377: */
0378: public int getCursorsBins() {
0379: return cursorsBins;
0380: }
0381:
0382: /**
0383: * Javadoc for this public method is generated via
0384: * the doc templates in the doc_src directory.
0385: */
0386: public int getDbClosedBins() {
0387: return dbClosedBins;
0388: }
0389:
0390: /**
0391: * Javadoc for this public method is generated via
0392: * the doc templates in the doc_src directory.
0393: */
0394: public int getInCompQueueSize() {
0395: return inCompQueueSize;
0396: }
0397:
0398: /**
0399: * Javadoc for this public method is generated via
0400: * the doc templates in the doc_src directory.
0401: */
0402: public long getLastCheckpointId() {
0403: return lastCheckpointId;
0404: }
0405:
0406: /**
0407: * Javadoc for this public method is generated via
0408: * the doc templates in the doc_src directory.
0409: */
0410: public long getNCacheMiss() {
0411: return nCacheMiss;
0412: }
0413:
0414: /**
0415: * Javadoc for this public method is generated via
0416: * the doc templates in the doc_src directory.
0417: */
0418: public int getNCheckpoints() {
0419: return nCheckpoints;
0420: }
0421:
0422: /**
0423: * Javadoc for this public method is generated via
0424: * the doc templates in the doc_src directory.
0425: */
0426: public int getCleanerBacklog() {
0427: return cleanerBacklog;
0428: }
0429:
0430: /**
0431: * Javadoc for this public method is generated via
0432: * the doc templates in the doc_src directory.
0433: */
0434: public int getNCleanerRuns() {
0435: return nCleanerRuns;
0436: }
0437:
0438: /**
0439: * Javadoc for this public method is generated via
0440: * the doc templates in the doc_src directory.
0441: */
0442: public int getNCleanerDeletions() {
0443: return nCleanerDeletions;
0444: }
0445:
0446: /**
0447: * Javadoc for this public method is generated via
0448: * the doc templates in the doc_src directory.
0449: */
0450: public int getNDeltaINFlush() {
0451: return nDeltaINFlush;
0452: }
0453:
0454: /**
0455: * Javadoc for this public method is generated via
0456: * the doc templates in the doc_src directory.
0457: */
0458: public long getLastCheckpointEnd() {
0459: return lastCheckpointEnd;
0460: }
0461:
0462: /**
0463: * Javadoc for this public method is generated via
0464: * the doc templates in the doc_src directory.
0465: */
0466: public long getEndOfLog() {
0467: return endOfLog;
0468: }
0469:
0470: /**
0471: * Javadoc for this public method is generated via
0472: * the doc templates in the doc_src directory.
0473: */
0474: public long getLastCheckpointStart() {
0475: return lastCheckpointStart;
0476: }
0477:
0478: /**
0479: * Javadoc for this public method is generated via
0480: * the doc templates in the doc_src directory.
0481: */
0482: public int getNCleanerEntriesRead() {
0483: return nCleanerEntriesRead;
0484: }
0485:
0486: /**
0487: * Javadoc for this public method is generated via
0488: * the doc templates in the doc_src directory.
0489: */
0490: public int getNEvictPasses() {
0491: return nEvictPasses;
0492: }
0493:
0494: /**
0495: * Javadoc for this public method is generated via
0496: * the doc templates in the doc_src directory.
0497: */
0498: public long getNFSyncs() {
0499: return nFSyncs;
0500: }
0501:
0502: /**
0503: * Javadoc for this public method is generated via
0504: * the doc templates in the doc_src directory.
0505: */
0506: public long getNFSyncRequests() {
0507: return nFSyncRequests;
0508: }
0509:
0510: /**
0511: * Javadoc for this public method is generated via
0512: * the doc templates in the doc_src directory.
0513: */
0514: public long getNFSyncTimeouts() {
0515: return nFSyncTimeouts;
0516: }
0517:
0518: /**
0519: * Javadoc for this public method is generated via
0520: * the doc templates in the doc_src directory.
0521: */
0522: public int getNFullINFlush() {
0523: return nFullINFlush;
0524: }
0525:
0526: /**
0527: * Javadoc for this public method is generated via
0528: * the doc templates in the doc_src directory.
0529: */
0530: public int getNFullBINFlush() {
0531: return nFullBINFlush;
0532: }
0533:
0534: /**
0535: * Javadoc for this public method is generated via
0536: * the doc templates in the doc_src directory.
0537: */
0538: public int getNINsObsolete() {
0539: return nINsObsolete;
0540: }
0541:
0542: /**
0543: * Javadoc for this public method is generated via
0544: * the doc templates in the doc_src directory.
0545: */
0546: public int getNINsCleaned() {
0547: return nINsCleaned;
0548: }
0549:
0550: /**
0551: * Javadoc for this public method is generated via
0552: * the doc templates in the doc_src directory.
0553: */
0554: public int getNINsDead() {
0555: return nINsDead;
0556: }
0557:
0558: /**
0559: * Javadoc for this public method is generated via
0560: * the doc templates in the doc_src directory.
0561: */
0562: public int getNINsMigrated() {
0563: return nINsMigrated;
0564: }
0565:
0566: /**
0567: * Javadoc for this public method is generated via
0568: * the doc templates in the doc_src directory.
0569: */
0570: public int getNLNsObsolete() {
0571: return nLNsObsolete;
0572: }
0573:
0574: /**
0575: * Javadoc for this public method is generated via
0576: * the doc templates in the doc_src directory.
0577: */
0578: public int getNLNsCleaned() {
0579: return nLNsCleaned;
0580: }
0581:
0582: /**
0583: * Javadoc for this public method is generated via
0584: * the doc templates in the doc_src directory.
0585: */
0586: public int getNLNsDead() {
0587: return nLNsDead;
0588: }
0589:
0590: /**
0591: * Javadoc for this public method is generated via
0592: * the doc templates in the doc_src directory.
0593: */
0594: public int getNLNsLocked() {
0595: return nLNsLocked;
0596: }
0597:
0598: /**
0599: * Javadoc for this public method is generated via
0600: * the doc templates in the doc_src directory.
0601: */
0602: public int getNLNsMigrated() {
0603: return nLNsMigrated;
0604: }
0605:
0606: /**
0607: * Javadoc for this public method is generated via
0608: * the doc templates in the doc_src directory.
0609: */
0610: public int getNLNsMarked() {
0611: return nLNsMarked;
0612: }
0613:
0614: /**
0615: * Javadoc for this public method is generated via
0616: * the doc templates in the doc_src directory.
0617: */
0618: public int getNLNQueueHits() {
0619: return nLNQueueHits;
0620: }
0621:
0622: /**
0623: * Javadoc for this public method is generated via
0624: * the doc templates in the doc_src directory.
0625: */
0626: public int getNPendingLNsProcessed() {
0627: return nPendingLNsProcessed;
0628: }
0629:
0630: /**
0631: * Javadoc for this public method is generated via
0632: * the doc templates in the doc_src directory.
0633: */
0634: public int getNMarkedLNsProcessed() {
0635: return nMarkedLNsProcessed;
0636: }
0637:
0638: /**
0639: * Javadoc for this public method is generated via
0640: * the doc templates in the doc_src directory.
0641: */
0642: public int getNToBeCleanedLNsProcessed() {
0643: return nToBeCleanedLNsProcessed;
0644: }
0645:
0646: /**
0647: * Javadoc for this public method is generated via
0648: * the doc templates in the doc_src directory.
0649: */
0650: public int getNClusterLNsProcessed() {
0651: return nClusterLNsProcessed;
0652: }
0653:
0654: /**
0655: * Javadoc for this public method is generated via
0656: * the doc templates in the doc_src directory.
0657: */
0658: public int getNPendingLNsLocked() {
0659: return nPendingLNsLocked;
0660: }
0661:
0662: /**
0663: * Javadoc for this public method is generated via
0664: * the doc templates in the doc_src directory.
0665: */
0666: public int getNLogBuffers() {
0667: return nLogBuffers;
0668: }
0669:
0670: /**
0671: * Javadoc for this public method is generated via
0672: * the doc templates in the doc_src directory.
0673: */
0674: public long getNNodesExplicitlyEvicted() {
0675: return nNodesExplicitlyEvicted;
0676: }
0677:
0678: /**
0679: * Javadoc for this public method is generated via
0680: * the doc templates in the doc_src directory.
0681: */
0682: public long getNBINsStripped() {
0683: return nBINsStripped;
0684: }
0685:
0686: /**
0687: * Javadoc for this public method is generated via
0688: * the doc templates in the doc_src directory.
0689: */
0690: public long getRequiredEvictBytes() {
0691: return requiredEvictBytes;
0692: }
0693:
0694: /**
0695: * Javadoc for this public method is generated via
0696: * the doc templates in the doc_src directory.
0697: */
0698: public long getNNodesScanned() {
0699: return nNodesScanned;
0700: }
0701:
0702: /**
0703: * Javadoc for this public method is generated via
0704: * the doc templates in the doc_src directory.
0705: */
0706: public long getNNodesSelected() {
0707: return nNodesSelected;
0708: }
0709:
0710: /**
0711: * Javadoc for this public method is generated via
0712: * the doc templates in the doc_src directory.
0713: */
0714: public long getCacheTotalBytes() {
0715: return cacheDataBytes + bufferBytes;
0716: }
0717:
0718: /**
0719: * Javadoc for this public method is generated via
0720: * the doc templates in the doc_src directory.
0721: */
0722: public long getCacheDataBytes() {
0723: return cacheDataBytes;
0724: }
0725:
0726: /**
0727: * The number of bytes of JE cache used for holding transaction objects,
0728: * log cleaning metadata, and other administrative structures. This is a
0729: * subset of cacheDataBytes.
0730: */
0731: public long getAdminBytes() {
0732: return adminBytes;
0733: }
0734:
0735: /**
0736: * The number of bytes of JE cache used for holding lock objects.
0737: * This is a subset of cacheDataBytes.
0738: */
0739: public long getLockBytes() {
0740: return lockBytes;
0741: }
0742:
0743: /**
0744: * Javadoc for this public method is generated via
0745: * the doc templates in the doc_src directory.
0746: */
0747: public long getNNotResident() {
0748: return nNotResident;
0749: }
0750:
0751: /**
0752: * Javadoc for this public method is generated via
0753: * the doc templates in the doc_src directory.
0754: */
0755: public int getNonEmptyBins() {
0756: return nonEmptyBins;
0757: }
0758:
0759: /**
0760: * Javadoc for this public method is generated via
0761: * the doc templates in the doc_src directory.
0762: */
0763: public int getProcessedBins() {
0764: return processedBins;
0765: }
0766:
0767: /**
0768: * Javadoc for this public method is generated via
0769: * the doc templates in the doc_src directory.
0770: */
0771: public long getNRepeatFaultReads() {
0772: return nRepeatFaultReads;
0773: }
0774:
0775: /**
0776: * Javadoc for this public method is generated via
0777: * the doc templates in the doc_src directory.
0778: */
0779: public long getNTempBufferWrites() {
0780: return nTempBufferWrites;
0781: }
0782:
0783: /**
0784: * Javadoc for this public method is generated via
0785: * the doc templates in the doc_src directory.
0786: */
0787: public long getNRepeatIteratorReads() {
0788: return nRepeatIteratorReads;
0789: }
0790:
0791: /**
0792: * Javadoc for this public method is generated via
0793: * the doc templates in the doc_src directory.
0794: */
0795: public long getTotalLogSize() {
0796: return totalLogSize;
0797: }
0798:
0799: /**
0800: * Javadoc for this public method is generated via
0801: * the doc templates in the doc_src directory.
0802: */
0803: public int getSplitBins() {
0804: return splitBins;
0805: }
0806:
0807: /**
0808: * Internal use only.
0809: */
0810: public void setCacheDataBytes(long cacheDataBytes) {
0811: this .cacheDataBytes = cacheDataBytes;
0812: }
0813:
0814: /**
0815: * Internal use only.
0816: */
0817: public void setAdminBytes(long adminBytes) {
0818: this .adminBytes = adminBytes;
0819: }
0820:
0821: /**
0822: * Internal use only.
0823: */
0824: public void setLockBytes(long lockBytes) {
0825: this .lockBytes = lockBytes;
0826: }
0827:
0828: /**
0829: * Internal use only.
0830: */
0831: public void setNNotResident(long nNotResident) {
0832: this .nNotResident = nNotResident;
0833: }
0834:
0835: /**
0836: * Internal use only.
0837: */
0838: public void setNCacheMiss(long nCacheMiss) {
0839: this .nCacheMiss = nCacheMiss;
0840: }
0841:
0842: /**
0843: * Internal use only.
0844: */
0845: public void setNLogBuffers(int nLogBuffers) {
0846: this .nLogBuffers = nLogBuffers;
0847: }
0848:
0849: /**
0850: * Internal use only.
0851: */
0852: public void setBufferBytes(long bufferBytes) {
0853: this .bufferBytes = bufferBytes;
0854: }
0855:
0856: /**
0857: * Internal use only.
0858: */
0859: public void setCursorsBins(int val) {
0860: cursorsBins = val;
0861: }
0862:
0863: /**
0864: * Internal use only.
0865: */
0866: public void setDbClosedBins(int val) {
0867: dbClosedBins = val;
0868: }
0869:
0870: /**
0871: * Internal use only.
0872: */
0873: public void setInCompQueueSize(int val) {
0874: inCompQueueSize = val;
0875: }
0876:
0877: /**
0878: * Internal use only.
0879: */
0880: public void setLastCheckpointId(long l) {
0881: lastCheckpointId = l;
0882: }
0883:
0884: /**
0885: * Internal use only.
0886: */
0887: public void setNCheckpoints(int val) {
0888: nCheckpoints = val;
0889: }
0890:
0891: /**
0892: * Internal use only.
0893: */
0894: public void setCleanerBacklog(int val) {
0895: cleanerBacklog = val;
0896: }
0897:
0898: /**
0899: * Internal use only.
0900: */
0901: public void setNCleanerRuns(int val) {
0902: nCleanerRuns = val;
0903: }
0904:
0905: /**
0906: * Internal use only.
0907: */
0908: public void setNCleanerDeletions(int val) {
0909: nCleanerDeletions = val;
0910: }
0911:
0912: /**
0913: * Internal use only.
0914: */
0915: public void setNDeltaINFlush(int val) {
0916: nDeltaINFlush = val;
0917: }
0918:
0919: /**
0920: * Internal use only.
0921: */
0922: public void setLastCheckpointEnd(long lsn) {
0923: lastCheckpointEnd = lsn;
0924: }
0925:
0926: /**
0927: * Internal use only.
0928: */
0929: public void setEndOfLog(long lsn) {
0930: endOfLog = lsn;
0931: }
0932:
0933: /**
0934: * Internal use only.
0935: */
0936: public void setLastCheckpointStart(long lsn) {
0937: lastCheckpointStart = lsn;
0938: }
0939:
0940: /**
0941: * Internal use only.
0942: */
0943: public void setNCleanerEntriesRead(int val) {
0944: nCleanerEntriesRead = val;
0945: }
0946:
0947: /**
0948: * Internal use only.
0949: */
0950: public void setNEvictPasses(int val) {
0951: nEvictPasses = val;
0952: }
0953:
0954: /**
0955: * Internal use only.
0956: */
0957: public void setNFSyncs(long val) {
0958: nFSyncs = val;
0959: }
0960:
0961: /**
0962: * Internal use only.
0963: */
0964: public void setNFSyncRequests(long val) {
0965: nFSyncRequests = val;
0966: }
0967:
0968: /**
0969: * Internal use only.
0970: */
0971: public void setNFSyncTimeouts(long val) {
0972: nFSyncTimeouts = val;
0973: }
0974:
0975: /**
0976: * Internal use only.
0977: */
0978: public void setNFullINFlush(int val) {
0979: nFullINFlush = val;
0980: }
0981:
0982: /**
0983: * Internal use only.
0984: */
0985: public void setNFullBINFlush(int val) {
0986: nFullBINFlush = val;
0987: }
0988:
0989: /**
0990: * Internal use only.
0991: */
0992: public void setNINsObsolete(int val) {
0993: nINsObsolete = val;
0994: }
0995:
0996: /**
0997: * Internal use only.
0998: */
0999: public void setNINsCleaned(int val) {
1000: nINsCleaned = val;
1001: }
1002:
1003: /**
1004: * Internal use only.
1005: */
1006: public void setNINsDead(int val) {
1007: nINsDead = val;
1008: }
1009:
1010: /**
1011: * Internal use only.
1012: */
1013: public void setNINsMigrated(int val) {
1014: nINsMigrated = val;
1015: }
1016:
1017: /**
1018: * Internal use only.
1019: */
1020: public void setNLNsObsolete(int val) {
1021: nLNsObsolete = val;
1022: }
1023:
1024: /**
1025: * Internal use only.
1026: */
1027: public void setNLNsCleaned(int val) {
1028: nLNsCleaned = val;
1029: }
1030:
1031: /**
1032: * Internal use only.
1033: */
1034: public void setNLNsDead(int val) {
1035: nLNsDead = val;
1036: }
1037:
1038: /**
1039: * Internal use only.
1040: */
1041: public void setNLNsLocked(int val) {
1042: nLNsLocked = val;
1043: }
1044:
1045: /**
1046: * Internal use only.
1047: */
1048: public void setNLNsMigrated(int val) {
1049: nLNsMigrated = val;
1050: }
1051:
1052: /**
1053: * Internal use only.
1054: */
1055: public void setNLNsMarked(int val) {
1056: nLNsMarked = val;
1057: }
1058:
1059: /**
1060: * Internal use only.
1061: */
1062: public void setNLNQueueHits(int val) {
1063: nLNQueueHits = val;
1064: }
1065:
1066: /**
1067: * Internal use only.
1068: */
1069: public void setNPendingLNsProcessed(int val) {
1070: nPendingLNsProcessed = val;
1071: }
1072:
1073: /**
1074: * Internal use only.
1075: */
1076: public void setNMarkedLNsProcessed(int val) {
1077: nMarkedLNsProcessed = val;
1078: }
1079:
1080: /**
1081: * Internal use only.
1082: */
1083: public void setNToBeCleanedLNsProcessed(int val) {
1084: nToBeCleanedLNsProcessed = val;
1085: }
1086:
1087: /**
1088: * Internal use only.
1089: */
1090: public void setNClusterLNsProcessed(int val) {
1091: nClusterLNsProcessed = val;
1092: }
1093:
1094: /**
1095: * Internal use only.
1096: */
1097: public void setNPendingLNsLocked(int val) {
1098: nPendingLNsLocked = val;
1099: }
1100:
1101: /**
1102: * Internal use only.
1103: */
1104: public void setNNodesExplicitlyEvicted(long l) {
1105: nNodesExplicitlyEvicted = l;
1106: }
1107:
1108: /**
1109: * Internal use only.
1110: */
1111: public void setRequiredEvictBytes(long l) {
1112: requiredEvictBytes = l;
1113: }
1114:
1115: /**
1116: * Internal use only.
1117: */
1118: public void setNBINsStripped(long l) {
1119: nBINsStripped = l;
1120: }
1121:
1122: /**
1123: * Internal use only.
1124: */
1125: public void setNNodesScanned(long l) {
1126: nNodesScanned = l;
1127: }
1128:
1129: /**
1130: * Internal use only.
1131: */
1132: public void setNNodesSelected(long l) {
1133: nNodesSelected = l;
1134: }
1135:
1136: /**
1137: * Internal use only.
1138: */
1139: public void setNonEmptyBins(int val) {
1140: nonEmptyBins = val;
1141: }
1142:
1143: /**
1144: * Internal use only.
1145: */
1146: public void setProcessedBins(int val) {
1147: processedBins = val;
1148: }
1149:
1150: /**
1151: * Internal use only.
1152: */
1153: public void setNRepeatFaultReads(long val) {
1154: nRepeatFaultReads = val;
1155: }
1156:
1157: /**
1158: * Internal use only.
1159: */
1160: public void setNTempBufferWrites(long val) {
1161: nTempBufferWrites = val;
1162: }
1163:
1164: /**
1165: * Internal use only.
1166: */
1167: public void setNRepeatIteratorReads(long val) {
1168: nRepeatIteratorReads = val;
1169: }
1170:
1171: /**
1172: * Internal use only.
1173: */
1174: public void setTotalLogSize(long val) {
1175: totalLogSize = val;
1176: }
1177:
1178: /**
1179: * Internal use only.
1180: */
1181: public void setSplitBins(int val) {
1182: splitBins = val;
1183: }
1184:
1185: /**
1186: * Javadoc for this public method is generated via
1187: * the doc templates in the doc_src directory.
1188: */
1189: public String toString() {
1190: DecimalFormat f = new DecimalFormat(
1191: "###,###,###,###,###,###,###");
1192:
1193: StringBuffer sb = new StringBuffer();
1194: sb.append("\nCompression stats\n");
1195: sb.append("splitBins=").append(f.format(splitBins))
1196: .append('\n');
1197: sb.append("dbClosedBins=").append(f.format(dbClosedBins))
1198: .append('\n');
1199: sb.append("cursorsBins=").append(f.format(cursorsBins)).append(
1200: '\n');
1201: sb.append("nonEmptyBins=").append(f.format(nonEmptyBins))
1202: .append('\n');
1203: sb.append("processedBins=").append(f.format(processedBins))
1204: .append('\n');
1205: sb.append("inCompQueueSize=").append(f.format(inCompQueueSize))
1206: .append('\n');
1207:
1208: // Evictor
1209: sb.append("\nEviction stats\n");
1210: sb.append("nEvictPasses=").append(f.format(nEvictPasses))
1211: .append('\n');
1212: sb.append("nNodesSelected=").append(f.format(nNodesSelected))
1213: .append('\n');
1214: sb.append("nNodesScanned=").append(f.format(nNodesScanned))
1215: .append('\n');
1216: sb.append("nNodesExplicitlyEvicted=").append(
1217: f.format(nNodesExplicitlyEvicted)).append('\n');
1218: sb.append("nBINsStripped=").append(f.format(nBINsStripped))
1219: .append('\n');
1220: sb.append("requiredEvictBytes=").append(
1221: f.format(requiredEvictBytes)).append('\n');
1222:
1223: // Checkpointer
1224: sb.append("\nCheckpoint stats\n");
1225: sb.append("nCheckpoints=").append(f.format(nCheckpoints))
1226: .append('\n');
1227: sb.append("lastCheckpointId=").append(
1228: f.format(lastCheckpointId)).append('\n');
1229: sb.append("nFullINFlush=").append(f.format(nFullINFlush))
1230: .append('\n');
1231: sb.append("nFullBINFlush=").append(f.format(nFullBINFlush))
1232: .append('\n');
1233: sb.append("nDeltaINFlush=").append(f.format(nDeltaINFlush))
1234: .append('\n');
1235: sb.append("lastCheckpointStart=").append(
1236: DbLsn.getNoFormatString(lastCheckpointStart)).append(
1237: '\n');
1238: sb.append("lastCheckpointEnd=").append(
1239: DbLsn.getNoFormatString(lastCheckpointEnd))
1240: .append('\n');
1241: sb.append("endOfLog=")
1242: .append(DbLsn.getNoFormatString(endOfLog)).append('\n');
1243:
1244: // Cleaner
1245: sb.append("\nCleaner stats\n");
1246: sb.append("cleanerBacklog=").append(f.format(cleanerBacklog))
1247: .append('\n');
1248: sb.append("nCleanerRuns=").append(f.format(nCleanerRuns))
1249: .append('\n');
1250: sb.append("nCleanerDeletions=").append(
1251: f.format(nCleanerDeletions)).append('\n');
1252: sb.append("nINsObsolete=").append(f.format(nINsObsolete))
1253: .append('\n');
1254: sb.append("nINsCleaned=").append(f.format(nINsCleaned)).append(
1255: '\n');
1256: sb.append("nINsDead=").append(f.format(nINsDead)).append('\n');
1257: sb.append("nINsMigrated=").append(f.format(nINsMigrated))
1258: .append('\n');
1259: sb.append("nLNsObsolete=").append(f.format(nLNsObsolete))
1260: .append('\n');
1261: sb.append("nLNsCleaned=").append(f.format(nLNsCleaned)).append(
1262: '\n');
1263: sb.append("nLNsDead=").append(f.format(nLNsDead)).append('\n');
1264: sb.append("nLNsLocked=").append(f.format(nLNsLocked)).append(
1265: '\n');
1266: sb.append("nLNsMigrated=").append(f.format(nLNsMigrated))
1267: .append('\n');
1268: sb.append("nLNsMarked=").append(f.format(nLNsMarked)).append(
1269: '\n');
1270: sb.append("nLNQueueHits=").append(f.format(nLNQueueHits))
1271: .append('\n');
1272: sb.append("nPendingLNsProcessed=").append(
1273: f.format(nPendingLNsProcessed)).append('\n');
1274: sb.append("nMarkedLNsProcessed=").append(
1275: f.format(nMarkedLNsProcessed)).append('\n');
1276: sb.append("nToBeCleanedLNsProcessed=").append(
1277: f.format(nToBeCleanedLNsProcessed)).append('\n');
1278: sb.append("nClusterLNsProcessed=").append(
1279: f.format(nClusterLNsProcessed)).append('\n');
1280: sb.append("nPendingLNsLocked=").append(
1281: f.format(nPendingLNsLocked)).append('\n');
1282: sb.append("nCleanerEntriesRead=").append(
1283: f.format(nCleanerEntriesRead)).append('\n');
1284:
1285: // Cache
1286: sb.append("\nCache stats\n");
1287: sb.append("nNotResident=").append(f.format(nNotResident))
1288: .append('\n');
1289: sb.append("nCacheMiss=").append(f.format(nCacheMiss)).append(
1290: '\n');
1291: sb.append("nLogBuffers=").append(f.format(nLogBuffers)).append(
1292: '\n');
1293: sb.append("bufferBytes=").append(f.format(bufferBytes)).append(
1294: '\n');
1295: sb.append("cacheDataBytes=").append(f.format(cacheDataBytes))
1296: .append('\n');
1297: sb.append("adminBytes=").append(f.format(adminBytes)).append(
1298: '\n');
1299: sb.append("lockBytes=").append(f.format(lockBytes))
1300: .append('\n');
1301: sb.append("cacheTotalBytes=").append(
1302: f.format(getCacheTotalBytes())).append('\n');
1303:
1304: // Logging
1305: sb.append("\nLogging stats\n");
1306: sb.append("nFSyncs=").append(f.format(nFSyncs)).append('\n');
1307: sb.append("nFSyncRequests=").append(f.format(nFSyncRequests))
1308: .append('\n');
1309: sb.append("nFSyncTimeouts=").append(f.format(nFSyncTimeouts))
1310: .append('\n');
1311: sb.append("nRepeatFaultReads=").append(
1312: f.format(nRepeatFaultReads)).append('\n');
1313: sb.append("nTempBufferWrite=").append(
1314: f.format(nTempBufferWrites)).append('\n');
1315: sb.append("nRepeatIteratorReads=").append(
1316: f.format(nRepeatIteratorReads)).append('\n');
1317: sb.append("totalLogSize=").append(f.format(totalLogSize))
1318: .append('\n');
1319:
1320: return sb.toString();
1321: }
1322: }
|