Package org.jboss.varia.stats

Examples of org.jboss.varia.stats.TxReport


      Map misses = new HashMap();

      Iterator reports = getReportsIterator();
      while(reports.hasNext())
      {
         TxReport report = (TxReport) reports.next();

         Map contentionMap = (Map) report.getStats().get(CacheListener.ContentionStats.NAME);
         Map evictionMap = (Map) report.getStats().get(CacheListener.EvictionStats.NAME);
         Map hitsMap = (Map) report.getStats().get(CacheListener.HitStats.NAME);
         Map missesMap = (Map) report.getStats().get(CacheListener.MissStats.NAME);

         txTotal += report.getCount();

         if(contentionMap == null && evictionMap == null && hitsMap == null && missesMap == null)
         {
            continue;
         }

         reportsTable.append("<tr><td>");

         boolean selected = report.getName().equals(reportName);
         if(!selected)
         {
            reportsTable.append("<a href='HtmlAdaptor?")
               .append("action=invokeOpByName&name=")
               .append(getServiceName())
               .append("&methodName=generate&")
               .append("argType=java.lang.String&arg0=")
               .append(report.getName())
               .append("'>");
         }

         reportsTable.append(report.getName());

         if(!selected)
         {
            reportsTable.append("</a>");
         }

         reportsTable.append("</td><td>")
            .append(report.getCount()).append("</td></tr>");

         if(selected || reportName == null || reportName.trim().length() == 0)
         {
            if(contentionMap != null)
            {
View Full Code Here


      buf.append("</tr>");

      TxStatistics stats = getTxStatistics();
      for(Iterator iter = stats.getReports(); iter.hasNext();)
      {
         TxReport report = (TxReport) iter.next();

         String name = report.getName();
         buf.append("<tr valign='top'>")
            .append("<td>");

         boolean anchor = !name.equals(reportName) && reportName != null;
         if(anchor)
         {
            buf.append("<a href='HtmlAdaptor?")
               .append("action=invokeOpByName&name=")
               .append(getServiceName())
               .append("&methodName=generate&")
               .append("argType=java.lang.String&arg0=")
               .append(name)
               .append("'>");
         }

         buf.append(name)
            .append("</td><td>")
            .append(report.getCount())
            .append("</td>");

         if(anchor)
         {
            buf.append("</a>");
         }

         buf.append("</td></tr>");
      }

      buf.append("</table>");
      buf.append("</td><td>");

      TxReport report = stats.getReports(reportName);
      if(report != null)
      {
         buf.append("<table><tr>");

         String[] itemNames = stats.getCollectedItemNames();
         for(int i = 0; i < itemNames.length; ++i)
         {
            buf.append("<th>").append(itemNames[i]).append("</th>");
         }

         buf.append("</tr><tr valign='top'>");

         for(int i = 0; i < itemNames.length; ++i)
         {
            buf.append("<td>");
            String itemName = itemNames[i];

            Map itemMap = (Map) report.getStats().get(itemName);
            if(itemMap != null && !itemMap.isEmpty())
            {
               buf.append("<table width='100%'>")
                  .append("<tr><th>item</th><th>%</th><th>avg</th><th>min</th><th>max</th></tr>");

               for(Iterator itemIter = itemMap.values().iterator(); itemIter.hasNext();)
               {
                  StatisticalItem item = (StatisticalItem) itemIter.next();
                  buf.append("<tr><td>")
                     .append(item.getValue())
                     .append("</td><td>")
                     .append(100*((double)item.getMergedItemsTotal() / report.getCount()))
                     .append("</td><td>")
                     .append(((double) item.getCount()) / report.getCount())
                     .append("</td><td>")
                     .append(item.getMinCountPerTx())
                     .append("</td><td>")
                     .append(item.getMaxCountPerTx())
                     .append("</td>");
View Full Code Here

      int txTotal = 0;

      Iterator reports = getReportsIterator();
      while(reports.hasNext())
      {
         TxReport report = (TxReport) reports.next();
         txTotal += report.getCount();
         reportsTable.append("<tr><td>");

         boolean selected = report.getName().equals(reportName);
         if(!selected)
         {
            reportsTable.append("<a href='HtmlAdaptor?")
               .append("action=invokeOpByName&name=")
               .append(getServiceName())
               .append("&methodName=generate&")
               .append("argType=java.lang.String&arg0=")
               .append(report.getName())
               .append("'>");
         }

         reportsTable.append(report.getName());

         if(!selected)
         {
            reportsTable.append("</a>");
         }

         reportsTable.append("</td><td>")
            .append(report.getCount()).append("</td></tr>");

         if(selected || reportName == null || reportName.trim().length() == 0)
         {
            generateReport(report, sqls, tables);
         }
View Full Code Here

TOP

Related Classes of org.jboss.varia.stats.TxReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.