本文整理汇总了Java中org.github.jamm.MemoryMeter.measureDeep方法的典型用法代码示例。如果您正苦于以下问题:Java MemoryMeter.measureDeep方法的具体用法?Java MemoryMeter.measureDeep怎么用?Java MemoryMeter.measureDeep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.github.jamm.MemoryMeter
的用法示例。
在下文中一共展示了MemoryMeter.measureDeep方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSessionMemorySize
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
/**
* HttpSession 객체에 대한 메모리 점유 사이즈를 계산
*
* @param session
* @return
*/
private long getSessionMemorySize(HttpSession session) {
if( statsEnabled == false )
return 0;
else if( khanSessionConfig.isEnableMemoryStatistics() == false )
return 0;
if( memoryStatError )
return 0;
// TODO : agent를 설정하지 않을 경우를 체크해야 함
long memorySize = 0;
try {
MemoryMeter meter = new MemoryMeter();
memorySize += meter.measureDeep(getSessionAttributes(session.getId()));
} catch (Exception e) {
log.error("Session memory size calculation error");
memoryStatError = true;
}
return memorySize;
}
示例2: maybeMeasureMemory
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public void maybeMeasureMemory() throws IOException {
final String memPath = bc.getMemoryMeasurementPath();
if (memPath != null) {
final MemoryMeter meter = new MemoryMeter();
final long memoryB = meter.measureDeep(adapter.engine());
final double memoryMB = memoryB / Math.pow(10, 6);
final String line = String.join(",",
Arrays.asList(bc.getToolName(), bc.getQueryVariant(), bc.getFileName(), String.format("%.02f", memoryMB))) + "\n";
FileUtils.write(new File(memPath), line, Charset.defaultCharset(), true);
}
}
示例3: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
return meter.measure(this)
+ meter.measureDeep(attrs)
+ meter.measureDeep(processedKeys)
+ meter.measureDeep(columnOperations)
+ (columnConditions == null ? 0 : meter.measureDeep(columnConditions))
+ (staticConditions == null ? 0 : meter.measureDeep(staticConditions));
}
示例4: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
@Override
public long measureForPreparedCache(MemoryMeter meter) {
return meter.measure(this)
+ meter.measureDeep(startwclause)
+ meter.measureDeep(paths)
+ meter.measureDeep(allKeyRestrictions)
+ meter.measureDeep(allColumnRestrictions)
+ meter.measureDeep(restrictedColumns);
/*
+ meter.measureDeep(metadataRestrictions)
+ (sliceRestriction == null ? 0 : meter.measureDeep(sliceRestriction))
+ (orderingIndexes == null ? 0 : meter.measureDeep(orderingIndexes));
*/
}
示例5: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
long size = meter.measure(this)
+ meter.measureDeep(type)
+ meter.measure(statements)
+ meter.measureDeep(attrs);
for (ModificationStatement stmt : statements)
size += stmt.measureForPreparedCache(meter);
return size;
}
示例6: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
return meter.measure(this)
+ meter.measureDeep(parameters)
+ meter.measureDeep(selection)
+ (limit == null ? 0 : meter.measureDeep(limit))
+ meter.measureDeep(keyRestrictions)
+ meter.measureDeep(columnRestrictions)
+ meter.measureDeep(metadataRestrictions)
+ meter.measureDeep(restrictedColumns)
+ (sliceRestriction == null ? 0 : meter.measureDeep(sliceRestriction))
+ (orderingIndexes == null ? 0 : meter.measureDeep(orderingIndexes));
}
示例7: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
long size = meter.measure(this) + meter.measure(statements) + meter.measureDeep(attrs);
for (ModificationStatement stmt : statements)
size += stmt.measureForPreparedCache(meter);
return size;
}
示例8: estimateSize
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
@Override
public long estimateSize(MemoryMeter meter)
{
return meter.measureDeep(index);
}
示例9: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
return meter.measureDeep(this) - meter.measureDeep(cfm);
}
示例10: measureForPreparedCache
import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
return meter.measureDeep(this) - meter.measureDeep(cfDef);
}