Class RamUsageUtil
java.lang.Object
org.apache.lucene.codecs.uniformsplit.RamUsageUtil
Utility methods to estimate the RAM usage of objects. It relies on
RamUsageEstimator
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private static final long
private static final long
private static final long
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic long
ramBytesUsed
(TermState termState) static long
ramBytesUsed
(BytesRef bytesRef) static long
ramBytesUsed
(BytesRefBuilder bytesRefBuilder) static long
ramBytesUsedByByteArrayOfLength
(int length) static long
ramBytesUsedByHashMapOfSize
(int size) static long
ramBytesUsedByObjectArrayOfLength
(int length) static long
-
Field Details
-
BYTES_REF_BASE_RAM_USAGE
private static final long BYTES_REF_BASE_RAM_USAGE -
BYTES_REF_BUILDER_BASE_RAM_USAGE
private static final long BYTES_REF_BUILDER_BASE_RAM_USAGE -
HASH_MAP_BASE_RAM_USAGE
private static final long HASH_MAP_BASE_RAM_USAGE -
HASH_MAP_ENTRY_BASE_RAM_USAGE
private static final long HASH_MAP_ENTRY_BASE_RAM_USAGE -
UNMODIFIABLE_ARRAY_LIST_BASE_RAM_USAGE
private static final long UNMODIFIABLE_ARRAY_LIST_BASE_RAM_USAGE
-
-
Constructor Details
-
RamUsageUtil
public RamUsageUtil()
-
-
Method Details
-
ramBytesUsed
-
ramBytesUsed
-
ramBytesUsed
-
ramBytesUsedByByteArrayOfLength
public static long ramBytesUsedByByteArrayOfLength(int length) -
ramBytesUsedByHashMapOfSize
public static long ramBytesUsedByHashMapOfSize(int size) -
ramBytesUsedByUnmodifiableArrayListOfSize
public static long ramBytesUsedByUnmodifiableArrayListOfSize(int size) -
ramBytesUsedByObjectArrayOfLength
public static long ramBytesUsedByObjectArrayOfLength(int length)
-