%-- * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved. --%> <%@ page import="java.text.DecimalFormat" %> <%@ page import="org.pentaho.platform.repository.hibernate.HibernateUtil" %> <%@ page import="org.hibernate.SessionFactory" %> <% SessionFactory _hibSessionFactory = HibernateUtil.getSessionFactory(); %>
Region Name | Cache Puts | Cache Hits | Cache Misses | Cache Hit % | Elements in Memory | Memory Used | Elements on Disk | |
<%= regionNames[i] %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getPutCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getHitCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getMissCount() %> | <% if (_hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getHitCount() > 0) { %><%= (int)(((float)_hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getHitCount() / (float)(_hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getHitCount() + _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getMissCount())) * 100) + "%" %> | <% } else { %><%= "0%" %> | <% } float sizeInMemory = _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getSizeInMemory(); totalItemsInMemory+=_hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getElementCountInMemory(); totalItemsOnDisk+=_hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getElementCountOnDisk(); totalSizeInMemory+=sizeInMemory; %><%= _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getElementCountInMemory() %> | <%= df.format(sizeInMemory/1024) + "k" %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheStatistics(regionNames[i]).getElementCountOnDisk() %> |
Second Level Cache Totals | <%= _hibSessionFactory.getStatistics().getSecondLevelCachePutCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheMissCount() %> | <% if (_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() > 0) { %><%= (int)(((float)_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() / (float)(_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() + _hibSessionFactory.getStatistics().getSecondLevelCacheMissCount())) * 100) + "%" %> | <% } else { %><%= "0%" %> | <% } %>- | - | - |
Query Cache Totals | <%= _hibSessionFactory.getStatistics().getQueryCachePutCount() %> | <%= _hibSessionFactory.getStatistics().getQueryCacheHitCount() %> | <%= _hibSessionFactory.getStatistics().getQueryCacheMissCount() %> | <% if (_hibSessionFactory.getStatistics().getQueryCacheHitCount() > 0) { %><%= (int)(((float)_hibSessionFactory.getStatistics().getQueryCacheHitCount() / (float)(_hibSessionFactory.getStatistics().getQueryCacheHitCount() + _hibSessionFactory.getStatistics().getQueryCacheMissCount())) * 100) + "%" %> | <% } else { %><%= "0%" %> | <% } %>- | - | - |
Grand Totals | <%= _hibSessionFactory.getStatistics().getSecondLevelCachePutCount() + _hibSessionFactory.getStatistics().getQueryCachePutCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() + _hibSessionFactory.getStatistics().getQueryCacheHitCount() %> | <%= _hibSessionFactory.getStatistics().getSecondLevelCacheMissCount() + _hibSessionFactory.getStatistics().getQueryCacheMissCount() %> | <% if (_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() + _hibSessionFactory.getStatistics().getQueryCacheHitCount() > 0) { %><%= (int)(((float)(_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() + _hibSessionFactory.getStatistics().getQueryCacheHitCount()) / (float)(_hibSessionFactory.getStatistics().getSecondLevelCacheHitCount() + _hibSessionFactory.getStatistics().getQueryCacheHitCount() + _hibSessionFactory.getStatistics().getSecondLevelCacheMissCount() + _hibSessionFactory.getStatistics().getQueryCacheMissCount())) * 100) + "%" %> | <% } else { %><%= "0%" %> | <% } %><%= totalItemsInMemory %> | <%= df.format(totalSizeInMemory/1024) + "k" %> | <%= totalItemsOnDisk %> |