LUCENE-5094: add ramBytesUsed to OrdinalMap

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1502697 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-07-12 21:44:11 +00:00
parent 7983841e88
commit 792bae8b26
2 changed files with 16 additions and 0 deletions

View File

@ -57,6 +57,11 @@ New features
* LUCENE-5098: New broadword utility methods in oal.util.BroadWord.
(Paul Elschot via Adrien Grand, Dawid Weiss)
API Changes
* LUCENE-5094: Add ramBytesUsed() to MultiDocValues.OrdinalMap.
(Robert Muir)
======================= Lucene 4.4.0 =======================
Changes in backwards compatibility policy

View File

@ -360,6 +360,17 @@ public class MultiDocValues {
public long getValueCount() {
return globalOrdDeltas.size();
}
/**
* Returns total byte size used by this ordinal map.
*/
public long ramBytesUsed() {
long size = globalOrdDeltas.ramBytesUsed() + subIndexes.ramBytesUsed();
for (int i = 0; i < ordDeltas.length; i++) {
size += ordDeltas[i].ramBytesUsed();
}
return size;
}
}
/**