Skip to content

Commit aacce32

Browse files
committed
fix stats comments
1 parent b4887ed commit aacce32

File tree

1 file changed

+40
-26
lines changed

1 file changed

+40
-26
lines changed

src/statistics.rs

+40-26
Original file line numberDiff line numberDiff line change
@@ -152,27 +152,31 @@ iterable_named_enum! {
152152
BlockCacheCompressionDictBytesInsert("rocksdb.block.cache.compression.dict.bytes.insert"),
153153

154154
/// # of blocks redundantly inserted into block cache.
155-
/// REQUIRES: BLOCK_CACHE_ADD_REDUNDANT <= BLOCK_CACHE_ADD
155+
/// REQUIRES: BlockCacheAddRedundant <= BlockCacheAdd
156156
BlockCacheAddRedundant("rocksdb.block.cache.add.redundant"),
157157
/// # of index blocks redundantly inserted into block cache.
158-
/// REQUIRES: BLOCK_CACHE_INDEX_ADD_REDUNDANT <= BLOCK_CACHE_INDEX_ADD
158+
/// REQUIRES: BlockCacheIndexAddRedundant <= BlockCacheIndexAdd
159159
BlockCacheIndexAddRedundant("rocksdb.block.cache.index.add.redundant"),
160160
/// # of filter blocks redundantly inserted into block cache.
161-
/// REQUIRES: BLOCK_CACHE_FILTER_ADD_REDUNDANT <= BLOCK_CACHE_FILTER_ADD
161+
/// REQUIRES: BlockCacheFilterAddRedundant <= BlockCacheFilterAdd
162162
BlockCacheFilterAddRedundant("rocksdb.block.cache.filter.add.redundant"),
163163
/// # of data blocks redundantly inserted into block cache.
164-
/// REQUIRES: BLOCK_CACHE_DATA_ADD_REDUNDANT <= BLOCK_CACHE_DATA_ADD
164+
/// REQUIRES: BlockCacheDataAddRedundant <= BlockCacheDataAdd
165165
BlockCacheDataAddRedundant("rocksdb.block.cache.data.add.redundant"),
166-
// # of dict blocks redundantly inserted into block cache.
167-
// REQUIRES: BLOCK_CACHE_COMPRESSION_DICT_ADD_REDUNDANT
168-
// <= BLOCK_CACHE_COMPRESSION_DICT_ADD
166+
/// # of dict blocks redundantly inserted into block cache.
167+
/// REQUIRES: BlockCacheCompressionDictAddRedundant
168+
/// <= BlockCacheCompressionDictAdd
169169
BlockCacheCompressionDictAddRedundant("rocksdb.block.cache.compression.dict.add.redundant"),
170170

171+
/// Secondary cache statistics
171172
SecondaryCacheHits("rocksdb.secondary.cache.hits"),
173+
174+
/// Fine grained secondary cache stats
172175
SecondaryCacheFilterHits("rocksdb.secondary.cache.filter.hits"),
173176
SecondaryCacheIndexHits("rocksdb.secondary.cache.index.hits"),
174177
SecondaryCacheDataHits("rocksdb.secondary.cache.data.hits"),
175178

179+
/// Compressed secondary cache related stats
176180
CompressedSecondaryCacheDummyHits("rocksdb.compressed.secondary.cache.dummy.hits"),
177181
CompressedSecondaryCacheHits("rocksdb.compressed.secondary.cache.hits"),
178182
CompressedSecondaryCachePromotions("rocksdb.compressed.secondary.cache.promotions"),
@@ -218,21 +222,21 @@ iterable_named_enum! {
218222
/// # of Get() queries served by L2 and up
219223
GetHitL2AndUp("rocksdb.l2andup.hit"),
220224

221-
/**
222-
* Compaction_KeyDrop* count the reasons for key drop during compaction
223-
* There are 4 reasons currently.
224-
*/
225-
CompactionKeyDropNewerEntry("rocksdb.compaction.key.drop.new"),
225+
///
226+
/// Compaction_KeyDrop* count the reasons for key drop during compaction
227+
/// There are 4 reasons currently.
228+
///
226229
/// key was written with a newer value.
227230
/// Also includes keys dropped for range del.
228-
CompactionKeyDropObsolete("rocksdb.compaction.key.drop.obsolete"),
231+
CompactionKeyDropNewerEntry("rocksdb.compaction.key.drop.new"),
229232
/// The key is obsolete.
230-
CompactionKeyDropRangeDel("rocksdb.compaction.key.drop.range_del"),
233+
CompactionKeyDropObsolete("rocksdb.compaction.key.drop.obsolete"),
231234
/// key was covered by a range tombstone.
232-
CompactionKeyDropUser("rocksdb.compaction.key.drop.user"),
235+
CompactionKeyDropRangeDel("rocksdb.compaction.key.drop.range_del"),
233236
/// user compaction function has dropped the key.
234-
CompactionRangeDelDropObsolete("rocksdb.compaction.range_del.drop.obsolete"),
237+
CompactionKeyDropUser("rocksdb.compaction.key.drop.user"),
235238
/// all keys in range were deleted.
239+
CompactionRangeDelDropObsolete("rocksdb.compaction.range_del.drop.obsolete"),
236240
/// Deletions obsoleted before bottom level due to file gap optimization.
237241
CompactionOptimizedDelDropObsolete("rocksdb.compaction.optimized.del.drop.obsolete"),
238242
/// If a compaction was canceled in sfm to prevent ENOSPC
@@ -269,8 +273,9 @@ iterable_named_enum! {
269273
/// over large number of keys with same userkey.
270274
NumberOfReseeksInIteration("rocksdb.number.reseeks.iteration"),
271275

272-
NoIteratorCreated("rocksdb.num.iterator.created"),
273276
/// number of iterators created
277+
NoIteratorCreated("rocksdb.num.iterator.created"),
278+
/// number of iterators deleted
274279
NoIteratorDeleted("rocksdb.num.iterator.deleted"),
275280

276281
NoFileOpens("rocksdb.no.file.opens"),
@@ -285,6 +290,9 @@ iterable_named_enum! {
285290
NumberMultigetCalls("rocksdb.number.multiget.get"),
286291
NumberMultigetKeysRead("rocksdb.number.multiget.keys.read"),
287292
NumberMultigetBytesRead("rocksdb.number.multiget.bytes.read"),
293+
/// Number of keys actually found in MultiGet calls (vs number requested by
294+
/// caller)
295+
/// NumberMultigetKeys_Read gives the number requested by caller
288296
NumberMultigetKeysFound("rocksdb.number.multiget.keys.found"),
289297

290298
NumberMergeFailures("rocksdb.number.merge.failures"),
@@ -300,16 +308,17 @@ iterable_named_enum! {
300308
/// Writes can be processed by requesting thread or by the thread at the
301309
/// head of the writers queue.
302310
WriteDoneBySelf("rocksdb.write.self"),
303-
WriteDoneByOther("rocksdb.write.other"),
304311
/// Equivalent to writes done for others
305-
WriteWithWal("rocksdb.write.wal"),
312+
WriteDoneByOther("rocksdb.write.other"),
306313
/// Number of Write calls that request WAL
307-
CompactReadBytes("rocksdb.compact.read.bytes"),
314+
WriteWithWal("rocksdb.write.wal"),
308315
/// Bytes read during compaction
309-
CompactWriteBytes("rocksdb.compact.write.bytes"),
316+
CompactReadBytes("rocksdb.compact.read.bytes"),
310317
/// Bytes written during compaction
311-
FlushWriteBytes("rocksdb.flush.write.bytes"),
318+
CompactWriteBytes("rocksdb.compact.write.bytes"),
312319
/// Bytes written during flush
320+
FlushWriteBytes("rocksdb.flush.write.bytes"),
321+
313322

314323
/// Compaction read and write statistics broken down by CompactionReason
315324
CompactReadBytesMarked("rocksdb.compact.read.marked.bytes"),
@@ -329,6 +338,7 @@ iterable_named_enum! {
329338
/// # of compressions/decompressions executed
330339
NumberBlockCompressed("rocksdb.number.block.compressed"),
331340
NumberBlockDecompressed("rocksdb.number.block.decompressed"),
341+
332342
/// Number of input bytes (uncompressed) to compression for SST blocks that
333343
/// are stored compressed.
334344
BytesCompressedFrom("rocksdb.bytes.compressed.from"),
@@ -346,10 +356,12 @@ iterable_named_enum! {
346356
/// CompressionOptions::max_compressed_bytes_per_kb) or found invalid by the
347357
/// `verify_compression` option.
348358
BytesCompressionRejected("rocksdb.bytes.compression.rejected"),
359+
349360
/// Like BytesCompressionBypassed but counting number of blocks
350361
NumberBlockCompressionBypassed("rocksdb.number.block_compression_bypassed"),
351362
/// Like BytesCompressionRejected but counting number of blocks
352363
NumberBlockCompressionRejected("rocksdb.number.block_compression_rejected"),
364+
353365
/// Number of input bytes (compressed) to decompression in reading compressed
354366
/// SST blocks from storage.
355367
BytesDecompressedFrom("rocksdb.bytes.decompressed.from"),
@@ -371,10 +383,11 @@ iterable_named_enum! {
371383
/// (ReadAMP_ToTAL_ReadBytes / Read_AMP_Estimate_UsefulBytes)
372384
//
373385
/// REQUIRES: ReadOptions::read_amp_bytes_per_bit to be enabled
374-
ReadAmpEstimateUsefulBytes("rocksdb.read.amp.estimate.useful.bytes"),
375386
/// Estimate of total bytes actually used.
376-
ReadAmpTotalReadBytes("rocksdb.read.amp.total.read.bytes"),
387+
ReadAmpEstimateUsefulBytes("rocksdb.read.amp.estimate.useful.bytes"),
377388
/// Total size of loaded data blocks.
389+
ReadAmpTotalReadBytes("rocksdb.read.amp.total.read.bytes"),
390+
378391

379392
/// Number of refill intervals where rate limiter's bytes are fully consumed.
380393
NumberRateLimiterDrains("rocksdb.number.rate_limiter.drains"),
@@ -646,8 +659,8 @@ iterable_named_enum! {
646659

647660
// Time spent in writing SST files
648661
SstWriteMicros("rocksdb.sst.write.micros"),
649-
// Time spent in writing SST table (currently only block-based table) or
650-
// blob file for flush, compaction or db open
662+
// Time spent in writing SST table (currently only block-based table) or blob
663+
// file for flush, compaction or db open
651664
FileWriteFlushMicros("rocksdb.file.write.flush.micros"),
652665
FileWriteCompactionMicros("rocksdb.file.write.compaction.micros"),
653666
FileWriteDbOpenMicros("rocksdb.file.write.db.open.micros"),
@@ -658,6 +671,7 @@ iterable_named_enum! {
658671
BytesPerRead("rocksdb.bytes.per.read"),
659672
BytesPerWrite("rocksdb.bytes.per.write"),
660673
BytesPerMultiget("rocksdb.bytes.per.multiget"),
674+
661675
CompressionTimesNanos("rocksdb.compression.times.nanos"),
662676
DecompressionTimesNanos("rocksdb.decompression.times.nanos"),
663677
/// Number of merge operands passed to the merge operator in user read

0 commit comments

Comments
 (0)