/** * Calculates the average memory consumption by updating the stored information with * the provided current information.<p> * * @param currentStatus the memory status to update the average with */ public void calculateAverage(CmsMemoryStatus currentStatus) { int newCount = m_count + 1; m_maxMemory = ((m_count * m_maxMemory) + currentStatus.getMaxMemory()) / newCount; m_totalMemory = ((m_count * m_totalMemory) + currentStatus.getTotalMemory()) / newCount; m_usedMemory = ((m_count * m_usedMemory) + currentStatus.getUsedMemory()) / newCount; m_freeMemory = ((m_count * m_freeMemory) + currentStatus.getFreeMemory()) / newCount; m_usage = (m_usedMemory * 100) / m_maxMemory; m_count = newCount; }
/** * Calculates the average memory consumption by updating the stored information with * the provided current information.<p> * * @param currentStatus the memory status to update the average with */ public void calculateAverage(CmsMemoryStatus currentStatus) { int newCount = m_count + 1; m_maxMemory = ((m_count * m_maxMemory) + currentStatus.getMaxMemory()) / newCount; m_totalMemory = ((m_count * m_totalMemory) + currentStatus.getTotalMemory()) / newCount; m_usedMemory = ((m_count * m_usedMemory) + currentStatus.getUsedMemory()) / newCount; m_freeMemory = ((m_count * m_freeMemory) + currentStatus.getFreeMemory()) / newCount; m_usage = m_usedMemory * 100 / m_maxMemory; m_count = newCount; }
Messages.LOG_MM_WARNING_MEM_STATUS_6, new Object[] { new Long(m_memoryCurrent.getMaxMemory()), new Long(m_memoryCurrent.getTotalMemory()), new Long(m_memoryCurrent.getFreeMemory()), Messages.LOG_MM_WARNING_MEM_STATUS_6, new Object[] { new Long(m_memoryCurrent.getMaxMemory()), new Long(m_memoryCurrent.getTotalMemory()), new Long(m_memoryCurrent.getFreeMemory()), Messages.LOG_MM_WARNING_MEM_STATUS_AVG_6, new Object[] { new Long(m_memoryAverage.getMaxMemory()), new Long(m_memoryAverage.getTotalMemory()), new Long(m_memoryAverage.getFreeMemory()),
Messages.LOG_MM_WARNING_MEM_STATUS_6, new Object[] { new Long(m_memoryCurrent.getMaxMemory()), new Long(m_memoryCurrent.getTotalMemory()), new Long(m_memoryCurrent.getFreeMemory()), Messages.LOG_MM_WARNING_MEM_STATUS_6, new Object[] { new Long(m_memoryCurrent.getMaxMemory()), new Long(m_memoryCurrent.getTotalMemory()), new Long(m_memoryCurrent.getFreeMemory()), Messages.LOG_MM_WARNING_MEM_STATUS_AVG_6, new Object[] { new Long(m_memoryAverage.getMaxMemory()), new Long(m_memoryAverage.getTotalMemory()), new Long(m_memoryAverage.getFreeMemory()),
+ "\n\n" + "Memory maximum heap size: " + m_memoryCurrent.getMaxMemory() + " mb\n" + "Memory current heap size: "
+ "\n\n" + "Memory maximum heap size: " + m_memoryCurrent.getMaxMemory() + " mb\n" + "Memory current heap size: "