Package org.rocksdb
Class MemoryUtil
- java.lang.Object
-
- org.rocksdb.MemoryUtil
-
public class MemoryUtil extends java.lang.ObjectJNI passthrough for MemoryUtil.
-
-
Constructor Summary
Constructors Constructor Description MemoryUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<MemoryUsageType,java.lang.Long>getApproximateMemoryUsageByType(java.util.List<RocksDB> dbs, java.util.Set<Cache> caches)Returns the approximate memory usage of different types in the input list of DBs and Cache set.
-
-
-
Method Detail
-
getApproximateMemoryUsageByType
public static java.util.Map<MemoryUsageType,java.lang.Long> getApproximateMemoryUsageByType(java.util.List<RocksDB> dbs, java.util.Set<Cache> caches)
Returns the approximate memory usage of different types in the input list of DBs and Cache set. For instance, in the output map the key kMemTableTotal will be associated with the memory usage of all the mem-tables from all the input rocksdb instances.
Note that for memory usage inside Cache class, we will only report the usage of the input "cache_set" without including those Cache usage inside the input list "dbs" of DBs.
- Parameters:
dbs- List of dbs to collect memory usage for.caches- Set of caches to collect memory usage for.- Returns:
- Map from
MemoryUsageTypeto memory usage as aLong.
-
-