当前位置: 首页>>代码示例>>Java>>正文


Java RamUsageEstimator.sizeOf方法代码示例

本文整理汇总了Java中org.apache.lucene.util.RamUsageEstimator.sizeOf方法的典型用法代码示例。如果您正苦于以下问题:Java RamUsageEstimator.sizeOf方法的具体用法?Java RamUsageEstimator.sizeOf怎么用?Java RamUsageEstimator.sizeOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.util.RamUsageEstimator的用法示例。


在下文中一共展示了RamUsageEstimator.sizeOf方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  return RamUsageEstimator.alignObjectSize(
      RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
      + 3 * RamUsageEstimator.NUM_BYTES_INT     // bpvMinusBlockSize,valueCount,bitsPerValue
      + RamUsageEstimator.NUM_BYTES_LONG        // maskRight
      + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref
      + RamUsageEstimator.sizeOf(blocks);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:Packed64.java

示例2: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  long sizeInBytes = 0;
  sizeInBytes += RamUsageEstimator.sizeOf(minValues);
  sizeInBytes += RamUsageEstimator.sizeOf(averages);
  for(PackedInts.Reader reader: subReaders) {
    sizeInBytes += reader.ramBytesUsed();
  }
  return sizeInBytes;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:MonotonicBlockPackedReader.java

示例3: build

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
/** Build a {@link PackedLongValues} instance that contains values that
 *  have been added to this builder. This operation is destructive. */
public PackedLongValues build() {
  finish();
  pending = null;
  final PackedInts.Reader[] values = Arrays.copyOf(this.values, valuesOff);
  final long ramBytesUsed = PackedLongValues.BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(values);
  return new PackedLongValues(pageShift, pageMask, values, size, ramBytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:PackedLongValues.java

示例4: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  return RamUsageEstimator.alignObjectSize(
      RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
      + 2 * RamUsageEstimator.NUM_BYTES_INT     // valueCount,bitsPerValue
      + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref
      + RamUsageEstimator.sizeOf(blocks);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:Packed64SingleBlock.java

示例5: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  return RamUsageEstimator.alignObjectSize(
      RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
      + 2 * RamUsageEstimator.NUM_BYTES_INT     // valueCount,bitsPerValue
      + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // values ref
      + RamUsageEstimator.sizeOf(values);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:Direct32.java

示例6: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  return BASE_RAM_BYTES_USED
      + RamUsageEstimator.sizeOf(lowerLongs)
      + RamUsageEstimator.sizeOf(upperLongs)
      + RamUsageEstimator.sizeOf(upperZeroBitPositionIndex);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:EliasFanoEncoder.java

示例7: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  long size = BASE_RAM_BYTES_USED;
  for (byte[] block : blocks) {
    size += RamUsageEstimator.sizeOf(block);
  }
  return size;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:BytesStore.java

示例8: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  long size = BASE_RAM_BYTES_USED;
  size += bytes.ramBytesUsed();
  if (packed) {
    size += nodeRefToAddress.ramBytesUsed();
  } else if (nodeAddress != null) {
    size += nodeAddress.ramBytesUsed();
    size += inCounts.ramBytesUsed();
  }
  size += cachedArcsBytesUsed;
  size += RamUsageEstimator.sizeOf(bytesPerArc);
  return size;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:FST.java

示例9: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
    return SHALLOW_SIZE + RamUsageEstimator.sizeOf(array);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:BigArrays.java

示例10: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
  return RamUsageEstimator.NUM_BYTES_OBJECT_REF + RamUsageEstimator.sizeOf(values);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:FieldCacheImpl.java

示例11: docsWithFieldBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
private long docsWithFieldBytesUsed() {
  // size of the long[] + some overhead
  return docsWithField == null ? 0 : RamUsageEstimator.sizeOf(docsWithField.getBits()) + 64;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:NumericDocValuesWriter.java

示例12: ramBytesUsed

import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed(Long output) {
  return RamUsageEstimator.sizeOf(output);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:PositiveIntOutputs.java


注:本文中的org.apache.lucene.util.RamUsageEstimator.sizeOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。