Add cache capacity

This commit is contained in:
Andrea Cavalli 2024-09-19 11:10:45 +02:00
parent 8bd0e7cf12
commit fe6ec9afe3
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
package it.cavallium.dbengine.client;
public record MemoryStats(long estimateTableReadersMem, long sizeAllMemTables,
long curSizeAllMemTables, long estimateNumKeys, long blockCacheUsage,
long blockCachePinnedUsage, long liveVersions) {}
long curSizeAllMemTables, long estimateNumKeys, long blockCacheCapacity,
long blockCacheUsage, long blockCachePinnedUsage, long liveVersions) {}

View File

@ -1344,6 +1344,7 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
db.getAggregatedLongProperty(RocksDBLongProperty.SIZE_ALL_MEM_TABLES.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.CUR_SIZE_ALL_MEM_TABLES.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.ESTIMATE_NUM_KEYS.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_CAPACITY.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_USAGE.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_PINNED_USAGE.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.NUM_LIVE_VERSIONS.getName()) / this.handles.size()

View File

@ -79,7 +79,7 @@ public class LLMemoryKeyValueDatabase implements LLKeyValueDatabase {
@Override
public MemoryStats getMemoryStats() {
return new MemoryStats(0, 0, 0, 0, 0, 0, 1);
return new MemoryStats(0, 0, 0, 0, 0, 0, 0, 1);
}
@Override