1 /*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. 5 * 6 */ 7 8 package com.sleepycat.je.cleaner; 9 10 import com.sleepycat.je.utilint.StatDefinition; 11 import com.sleepycat.je.utilint.StatDefinition.StatType; 12 13 /** 14 * Per-stat Metadata for JE cleaner statistics. 15 */ 16 public class CleanerStatDefinition { 17 18 /* Group name for Cleaner related statistics. */ 19 public static final String GROUP_NAME = "Cleaning"; 20 public static final String GROUP_DESC = 21 "Frequency and extent of log file cleaning activity."; 22 23 /* Group name for FileSelector related statistics. */ 24 public static final String FS_GROUP_NAME = "FileSelector"; 25 public static final String FS_GROUP_DESC = 26 "Cleaner's activities when choosing an optimal file to clean."; 27 28 /* 29 * 30 */ 31 public static final StatDefinition CLEANER_BACKLOG = 32 new StatDefinition("cleanerBackLog", 33 "Number of files to be cleaned to reach the " + 34 "target utilization.", 35 StatType.CUMULATIVE); 36 37 /* 38 * 39 */ 40 public static final StatDefinition CLEANER_FILE_DELETION_BACKLOG = 41 new StatDefinition("fileDeletionBacklog", 42 "Number of files that are ready to be deleted.", 43 StatType.CUMULATIVE); 44 45 /* 46 * Number of calls to FileProcessor.processFile(), either for real 47 * cleaning or for utilization probe. 48 */ 49 public static final StatDefinition CLEANER_RUNS = 50 new StatDefinition("nCleanerRuns", 51 "Number of cleaner runs, including probe runs."); 52 53 /* 54 * Number of times FileProcessor.processFile() was called to do a 55 * utilization probe. 56 */ 57 public static final StatDefinition CLEANER_PROBE_RUNS = 58 new StatDefinition("nCleanerProbeRuns", 59 "Number of cleaner runs for probing utilization."); 60 61 /* 62 * Number of files actually deleted. 63 */ 64 public static final StatDefinition CLEANER_DELETIONS = 65 new StatDefinition("nCleanerDeletions", 66 "Number of cleaner file deletions."); 67 68 public static final StatDefinition CLEANER_PENDING_LN_QUEUE_SIZE = 69 new StatDefinition("pendingLNQueueSize", 70 "Number of LNs pending because they were locked " + 71 "and could not be migrated.", 72 StatType.CUMULATIVE); 73 74 public static final StatDefinition CLEANER_INS_OBSOLETE = 75 new StatDefinition("nINsObsolete", 76 "Accumulated number of INs obsolete."); 77 78 public static final StatDefinition CLEANER_INS_CLEANED = 79 new StatDefinition("nINsCleaned", 80 "Accumulated number of INs cleaned."); 81 82 public static final StatDefinition CLEANER_INS_DEAD = 83 new StatDefinition("nINsDead", 84 "Accumulated number of INs that were not found " + 85 "in the tree anymore (deleted)."); 86 87 public static final StatDefinition CLEANER_INS_MIGRATED = 88 new StatDefinition("nINsMigrated", 89 "Accumulated number of INs migrated."); 90 91 public static final StatDefinition CLEANER_BIN_DELTAS_OBSOLETE = 92 new StatDefinition("nBINDeltasObsolete", 93 "Accumulated number of BIN-deltas obsolete."); 94 95 public static final StatDefinition CLEANER_BIN_DELTAS_CLEANED = 96 new StatDefinition("nBINDeltasCleaned", 97 "Accumulated number of BIN-deltas cleaned."); 98 99 public static final StatDefinition CLEANER_BIN_DELTAS_DEAD = 100 new StatDefinition("nBINDeltasDead", 101 "Accumulated number of BIN-deltas that were not " + 102 "found in the tree anymore (deleted)."); 103 104 public static final StatDefinition CLEANER_BIN_DELTAS_MIGRATED = 105 new StatDefinition("nBINDeltasMigrated", 106 "Accumulated number of BIN-deltas migrated."); 107 108 public static final StatDefinition CLEANER_LNS_OBSOLETE = 109 new StatDefinition("nLNsObsolete", 110 "Accumulated number of LNs obsolete."); 111 112 public static final StatDefinition CLEANER_LNS_CLEANED = 113 new StatDefinition("nLNsCleaned", 114 "Accumulated number of LNs cleaned."); 115 116 public static final StatDefinition CLEANER_LNS_DEAD = 117 new StatDefinition("nLNsDead", 118 "Accumulated number of LNs that were not found " + 119 "in the tree anymore (deleted)."); 120 121 public static final StatDefinition CLEANER_LNS_LOCKED = 122 new StatDefinition("nLNsLocked", 123 "Accumulated number of LNs encountered that were " + 124 "locked."); 125 126 public static final StatDefinition CLEANER_LNS_MIGRATED = 127 new StatDefinition("nLNsMigrated", 128 "Accumulated number of LNs that were migrated " + 129 "forward in the log by the cleaner."); 130 131 public static final StatDefinition CLEANER_LNS_MARKED = 132 new StatDefinition("nLNsMarked", 133 "Accumulated number of LNs in temporary DBs that " + 134 " were dirtied by the cleaner and subsequently " + 135 " logging during checkpoint/eviction."); 136 137 public static final StatDefinition CLEANER_LNQUEUE_HITS = 138 new StatDefinition("nLNQueueHits", 139 "Accumulated number of LNs processed without a " + 140 "tree lookup."); 141 142 public static final StatDefinition CLEANER_PENDING_LNS_PROCESSED = 143 new StatDefinition("nPendingLNsProcessed", 144 "Accumulated number of LNs processed because " + 145 "they were previously locked."); 146 147 public static final StatDefinition CLEANER_MARKED_LNS_PROCESSED = 148 new StatDefinition("nMarkLNsProcessed", 149 "Accumulated number of LNs processed because " + 150 "they were previously marked for migration."); 151 152 public static final StatDefinition CLEANER_TO_BE_CLEANED_LNS_PROCESSED = 153 new StatDefinition("nToBeCleanedLNsProcessed", 154 "Accumulated number of LNs processed because " + 155 "they are soon to be cleaned."); 156 157 public static final StatDefinition CLEANER_CLUSTER_LNS_PROCESSED = 158 new StatDefinition("nClusterLNsProcessed", 159 "Accumulated number of LNs processed because " + 160 "they qualify for clustering."); 161 162 public static final StatDefinition CLEANER_PENDING_LNS_LOCKED = 163 new StatDefinition("nPendingLNsLocked", 164 "Accumulated number of pending LNs that could " + 165 "not be locked for migration because of a long " + 166 "duration application lock."); 167 168 public static final StatDefinition CLEANER_ENTRIES_READ = 169 new StatDefinition("nCleanerEntriesRead", 170 "Accumulated number of log entries read by the " + 171 "cleaner."); 172 173 public static final StatDefinition CLEANER_REPEAT_ITERATOR_READS = 174 new StatDefinition("nRepeatIteratorReads", 175 "Number of attempts to read a log entry larger " + 176 "than the read buffer size during which the log " + 177 "buffer couldn't be grown enough to accommodate " + 178 "the object."); 179 180 public static final StatDefinition CLEANER_TOTAL_LOG_SIZE = 181 new StatDefinition("totalLogSize", 182 "Approximation of the total log size in bytes.", 183 StatType.CUMULATIVE); 184 185 public static final StatDefinition CLEANER_LN_SIZE_CORRECTION_FACTOR = 186 new StatDefinition("lnSizeCorrectionFactor", 187 "The factor used to correct average LN size, for " + 188 "LNs whose obsolete size is not determined. " + 189 "Used to calculate corrected utilization.", 190 StatType.CUMULATIVE); 191 192 public static final StatDefinition CLEANER_LAST_KNOWN_UTILIZATION = 193 new StatDefinition("lastKnownUtilization", 194 "The last known log utilization as a percentage. " + 195 "This statistic provides a cheap way of checking " + 196 "the log utilization without having to run the " + 197 "DbSpace utility.", 198 StatType.CUMULATIVE); 199 } 200