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


Java MemoryMeter.measureDeep方法代码示例

本文整理汇总了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;
}
 
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:27,代码来源:KhanSessionManager.java

示例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);
	}
}
 
开发者ID:FTSRG,项目名称:trainbenchmark,代码行数:13,代码来源:IngraphDriver.java

示例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));
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:10,代码来源:ModificationStatement.java

示例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));
            */
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:15,代码来源:TravelStatement.java

示例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;
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:11,代码来源:BatchStatement.java

示例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));
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:14,代码来源:SelectStatement.java

示例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;
}
 
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:8,代码来源:BatchStatement.java

示例8: estimateSize

import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
@Override
public long estimateSize(MemoryMeter meter)
{
    return meter.measureDeep(index);
}
 
开发者ID:xedin,项目名称:sasi,代码行数:6,代码来源:SkipListMemIndex.java

示例9: measureForPreparedCache

import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
    return meter.measureDeep(this) - meter.measureDeep(cfm);
}
 
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:5,代码来源:ModificationStatement.java

示例10: measureForPreparedCache

import org.github.jamm.MemoryMeter; //导入方法依赖的package包/类
public long measureForPreparedCache(MemoryMeter meter)
{
    return meter.measureDeep(this) - meter.measureDeep(cfDef);
}
 
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:5,代码来源:UpdateStatement.java


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