speedb-io / log-parser

A tool for analyzing and parsing SpeedB and RocksDB log files
Apache License 2.0
21 stars 1 forks source link

Memory Tracking: Support new memory tool's log traces #52

Closed udi-speedb closed 8 months ago

udi-speedb commented 10 months ago

As part of https://github.com/speedb-io/speedb/issues/481, new traces were added to the log. These need to be supported by the log parser.

This is an example output of the tool:

2024/01/07-15:05:09.261322 55365 [/db_impl/db_impl.cc:1196] 
** Memory Reporting **
Arena Stats:
Total: 16M
ArenaWrappedDBIter: 0
FileIndexer::UpdateIndex: 0
MemTable::NewIterator: 0
LevelFileInit: 0
FindLevelFileTest::Add: 0
DoGenerateLevelFilesBrief: 0
TEST_GetLevelIterator: 0
Version::AddIteratorsForLevel: 0
Version::OverlapWithLevelIterator: 0
LogBuffer::AddLogToBuffer: 0
arena_test: 0
HashLinkList: 0
HashLinkListIterator: 0
HashLinkListDynamicIterator: 0
HashSkipList: 0
HashSkipListIterator: 0
HashSkipListDynamicIterator: 0
HashSpdb: 16M
HashSpdbIterator: 0
InlineSkipList: 0
SkipList: 0
SkipListIterator: 0
SkipListLookaheadIterator: 0
VectorMemtable: 0
CompactionMergingIterator: 0
NewErrorInternalIterator: 0
NewEmptyInternalIterator: 0
MergingIterator: 0
BlockBasedTableIterator: 0
BlockPrefixIndex::Builder: 0
CuckooTableIterator: 0
PlainTableBloomV1: 0
PlainTableIndexBuilder::FillIndexes: 0
PlainTableReader::NewIterator: 0
DynamicBloom: 0
DefaultMemtableImpl: 0
WriteBatchWithIndex: 0
CF Stats: 
Total: 16M
[default]: 16M
rocksdb.block-cache-usage: 96
rocksdb.estimate-table-readers-mem: 659K
rocksdb.block-cache-pinned-usage: 96
Total CacheAllocationUsage: 655K