예제 #1
0
 /**
  * {@inheritDoc}
  *
  * @see HibernateStats#getQueryStats()
  */
 public TabularData getQueryStats() {
   List<CompositeData> result = new ArrayList<CompositeData>();
   Statistics statistics = getStatistics();
   for (String query : statistics.getQueries()) {
     QueryStats queryStats = new QueryStats(query, statistics.getQueryStatistics(query));
     result.add(queryStats.toCompositeData());
   }
   TabularData td = QueryStats.newTabularDataInstance();
   td.putAll(result.toArray(new CompositeData[result.size()]));
   return td;
 }
예제 #2
0
 /**
  * {@inheritDoc}
  *
  * @see HibernateStats#getEntityStats()
  */
 public TabularData getEntityStats() {
   List<CompositeData> result = new ArrayList<CompositeData>();
   Statistics statistics = getStatistics();
   for (String entity : statistics.getEntityNames()) {
     EntityStats entityStats = new EntityStats(entity, statistics.getEntityStatistics(entity));
     result.add(entityStats.toCompositeData());
   }
   TabularData td = EntityStats.newTabularDataInstance();
   td.putAll(result.toArray(new CompositeData[result.size()]));
   return td;
 }
예제 #3
0
 /** {@inheritDoc} */
 public TabularData getCacheRegionStats() {
   List<CompositeData> list = new ArrayList<CompositeData>();
   Statistics statistics = getStatistics();
   for (String region : statistics.getSecondLevelCacheRegionNames()) {
     CacheRegionStats l2CacheStats =
         new CacheRegionStats(region, statistics.getSecondLevelCacheStatistics(region));
     list.add(l2CacheStats.toCompositeData());
   }
   TabularData td = CacheRegionStats.newTabularDataInstance();
   td.putAll(list.toArray(new CompositeData[list.size()]));
   return td;
 }
예제 #4
0
 /**
  * {@inheritDoc}
  *
  * @see HibernateStats#getCollectionStats()
  */
 public TabularData getCollectionStats() {
   List<CompositeData> result = new ArrayList<CompositeData>();
   Statistics statistics = getStatistics();
   for (String roleName : statistics.getCollectionRoleNames()) {
     CollectionStats collectionStats =
         new CollectionStats(roleName, statistics.getCollectionStatistics(roleName));
     result.add(collectionStats.toCompositeData());
   }
   TabularData td = CollectionStats.newTabularDataInstance();
   td.putAll(result.toArray(new CompositeData[result.size()]));
   return td;
 }