lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1502699 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/CHANGES.txt lucene/core/ lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
Date Fri, 12 Jul 2013 21:44:52 GMT
Author: rmuir
Date: Fri Jul 12 21:44:52 2013
New Revision: 1502699

URL: http://svn.apache.org/r1502699
Log:
LUCENE-5094: add ramBytesUsed to OrdinalMap

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1502699&r1=1502698&r2=1502699&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Fri Jul 12 21:44:52 2013
@@ -16,6 +16,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

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java?rev=1502699&r1=1502698&r2=1502699&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
Fri Jul 12 21:44:52 2013
@@ -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;
+    }
   }
   
   /** 



Mime
View raw message