public static EngineStatisticsMetadata createEngineStats( int activeSessionsCount, BufferServiceImpl bufferService, DQPCore dqp) { EngineStatisticsMetadata stats = new EngineStatisticsMetadata(); stats.setSessionCount(activeSessionsCount); stats.setTotalMemoryUsedInKB(bufferService.getHeapBufferInUseKb()); stats.setMemoryUsedByActivePlansInKB(bufferService.getMemoryReservedByActivePlansKb()); stats.setDiskWriteCount(bufferService.getDiskWriteCount()); stats.setDiskReadCount(bufferService.getDiskReadCount()); stats.setCacheReadCount(bufferService.getStorageReadCount()); stats.setCacheWriteCount(bufferService.getStorageWriteCount()); stats.setDiskSpaceUsedInMB(bufferService.getUsedDiskBufferSpaceMb()); stats.setActivePlanCount(dqp.getActivePlanCount()); stats.setWaitPlanCount(dqp.getWaitingPlanCount()); stats.setMaxWaitPlanWaterMark(dqp.getMaxWaitingPlanWatermark()); return stats; }
public EngineStatisticsMetadata unwrap(ModelNode node) { if (node == null) return null; EngineStatisticsMetadata stats = new EngineStatisticsMetadata(); stats.setSessionCount(node.get(SESSION_COUNT).asInt()); stats.setTotalMemoryUsedInKB(node.get(TOTAL_MEMORY_USED_IN_KB).asLong()); stats.setMemoryUsedByActivePlansInKB(node.get(MEMORY_IN_USE_BY_ACTIVE_PLANS).asLong()); stats.setDiskWriteCount(node.get(DISK_WRITE_COUNT).asLong()); stats.setDiskReadCount(node.get(DISK_READ_COUNT).asLong()); stats.setCacheReadCount(node.get(CACHE_READ_COUNT).asLong()); stats.setCacheWriteCount(node.get(CACHE_WRITE_COUNT).asLong()); stats.setDiskSpaceUsedInMB(node.get(DISK_SPACE_USED).asLong()); stats.setActivePlanCount(node.get(ACTIVE_PLAN_COUNT).asInt()); stats.setWaitPlanCount(node.get(WAITING_PLAN_COUNT).asInt()); stats.setMaxWaitPlanWaterMark(node.get(MAX_WAIT_PLAN_COUNT).asInt()); unwrapDomain(stats, node); return stats; }
public EngineStatisticsMetadata unwrap(ModelNode node) { if (node == null) return null; EngineStatisticsMetadata stats = new EngineStatisticsMetadata(); stats.setSessionCount(node.get(SESSION_COUNT).asInt()); stats.setTotalMemoryUsedInKB(node.get(TOTAL_MEMORY_USED_IN_KB).asLong()); stats.setMemoryUsedByActivePlansInKB(node.get(MEMORY_IN_USE_BY_ACTIVE_PLANS).asLong()); stats.setDiskWriteCount(node.get(DISK_WRITE_COUNT).asLong()); stats.setDiskReadCount(node.get(DISK_READ_COUNT).asLong()); stats.setCacheReadCount(node.get(CACHE_READ_COUNT).asLong()); stats.setCacheWriteCount(node.get(CACHE_WRITE_COUNT).asLong()); stats.setDiskSpaceUsedInMB(node.get(DISK_SPACE_USED).asLong()); stats.setActivePlanCount(node.get(ACTIVE_PLAN_COUNT).asInt()); stats.setWaitPlanCount(node.get(WAITING_PLAN_COUNT).asInt()); stats.setMaxWaitPlanWaterMark(node.get(MAX_WAIT_PLAN_COUNT).asInt()); unwrapDomain(stats, node); return stats; }