sb.append(" Idle: ........................ ").append(DatabaseFactory.getInstance().getIdleConnectionCount()).append('\n');
sb.append("Players").append('\n');
sb.append(" Update: ...................... ").append(GameStats.getUpdatePlayerBase()).append('\n');
double cacheHitCount, cacheMissCount, cacheHitRatio;
Cache cache;
LiveCacheStatistics cacheStats;
JdbcEntityStats entityStats;
cache = ItemsDAO.getInstance().getCache();
cacheStats = cache.getLiveCacheStatistics();
entityStats = ItemsDAO.getInstance().getStats();
cacheHitCount = cacheStats.getCacheHitCount();
cacheMissCount = cacheStats.getCacheMissCount();
cacheHitRatio = cacheHitCount / (cacheHitCount + cacheMissCount);
sb.append("Items").append('\n');
sb.append(" getLoadCount: ................ ").append(entityStats.getLoadCount()).append('\n');
sb.append(" getInsertCount: .............. ").append(entityStats.getInsertCount()).append('\n');
sb.append(" getUpdateCount: .............. ").append(entityStats.getUpdateCount()).append('\n');
sb.append(" getDeleteCount: .............. ").append(entityStats.getDeleteCount()).append('\n');
sb.append("Cache").append('\n');
sb.append(" getPutCount: ................. ").append(cacheStats.getPutCount()).append('\n');
sb.append(" getUpdateCount: .............. ").append(cacheStats.getUpdateCount()).append('\n');
sb.append(" getRemovedCount: ............. ").append(cacheStats.getRemovedCount()).append('\n');
sb.append(" getEvictedCount: ............. ").append(cacheStats.getEvictedCount()).append('\n');
sb.append(" getExpiredCount: ............. ").append(cacheStats.getExpiredCount()).append('\n');
sb.append(" getSize: ..................... ").append(cacheStats.getSize()).append('\n');
sb.append(" getLocalHeapSize: ............. ").append(cacheStats.getLocalHeapSize()).append('\n');
sb.append(" getLocalDiskSize: ............... ").append(cacheStats.getLocalDiskSize()).append('\n');
sb.append(" cacheHitRatio: ............... ").append(String.format("%2.2f", cacheHitRatio)).append('\n');
sb.append("=================================================\n");
cache = MailDAO.getInstance().getCache();
cacheStats = cache.getLiveCacheStatistics();
entityStats = MailDAO.getInstance().getStats();
cacheHitCount = cacheStats.getCacheHitCount();
cacheMissCount = cacheStats.getCacheMissCount();
cacheHitRatio = cacheHitCount / (cacheHitCount + cacheMissCount);
sb.append("Mail").append('\n');
sb.append(" getLoadCount: ................ ").append(entityStats.getLoadCount()).append('\n');
sb.append(" getInsertCount: .............. ").append(entityStats.getInsertCount()).append('\n');
sb.append(" getUpdateCount: .............. ").append(entityStats.getUpdateCount()).append('\n');
sb.append(" getDeleteCount: .............. ").append(entityStats.getDeleteCount()).append('\n');
sb.append("Cache").append('\n');
sb.append(" getPutCount: ................. ").append(cacheStats.getPutCount()).append('\n');
sb.append(" getUpdateCount: .............. ").append(cacheStats.getUpdateCount()).append('\n');
sb.append(" getRemovedCount: ............. ").append(cacheStats.getRemovedCount()).append('\n');
sb.append(" getEvictedCount: ............. ").append(cacheStats.getEvictedCount()).append('\n');
sb.append(" getExpiredCount: ............. ").append(cacheStats.getExpiredCount()).append('\n');
sb.append(" getSize: ..................... ").append(cacheStats.getSize()).append('\n');
sb.append(" getLocalHeapSize: ............. ").append(cacheStats.getLocalHeapSize()).append('\n');
sb.append(" getLocalDiskSize: ............... ").append(cacheStats.getLocalDiskSize()).append('\n');
sb.append(" cacheHitRatio: ............... ").append(String.format("%2.2f", cacheHitRatio)).append('\n');
sb.append("=================================================\n");
return sb.toString();
}
});