Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public String reportReplicationStatisticsCSV(String sessionId) {
   StringBuffer tmp = createCSVHeader();
   Map<String, ReplicationStatistics.TimeStatistic> stats = stats_.getStats();
   ReplicationStatistics.TimeStatistic stat =
       (ReplicationStatistics.TimeStatistic) stats.get(sessionId);
   if (stat != null) {
     tmp.append("\n");
     tmp.append(sessionId);
     tmp.append(",");
     tmp.append(stat.replicationCount);
     tmp.append(",");
     tmp.append(stat.minPassivationTime);
     tmp.append(",");
     tmp.append(stat.maxPassivationTime);
     tmp.append(",");
     tmp.append(stat.totalPassivationTime);
     tmp.append(",");
     tmp.append(stat.minReplicationTime);
     tmp.append(",");
     tmp.append(stat.maxReplicationTime);
     tmp.append(",");
     tmp.append(stat.totalReplicationlTime);
     tmp.append(",");
     tmp.append(stat.loadCount);
     tmp.append(",");
     tmp.append(stat.minLoadTime);
     tmp.append(",");
     tmp.append(stat.maxLoadTime);
     tmp.append(",");
     tmp.append(stat.totalLoadlTime);
   }
   return tmp.toString();
 }
Ejemplo n.º 2
0
  /** {@inheritDoc} */
  public String reportReplicationStatistics() {
    StringBuffer tmp = new StringBuffer();
    tmp.append("<table><tr>");
    tmp.append("<th>sessionID</th>");
    tmp.append("<th>replicationCount</th>");
    tmp.append("<th>minPassivationTime</th>");
    tmp.append("<th>maxPassivationTime</th>");
    tmp.append("<th>totalPassivationTime</th>");
    tmp.append("<th>minReplicationTime</th>");
    tmp.append("<th>maxReplicationTime</th>");
    tmp.append("<th>totalReplicationlTime</th>");
    tmp.append("<th>loadCount</th>");
    tmp.append("<th>minLoadTime</th>");
    tmp.append("<th>maxLoadTime</th>");
    tmp.append("<th>totalLoadTime</th>");

    Map<String, ReplicationStatistics.TimeStatistic> copy =
        new HashMap<String, ReplicationStatistics.TimeStatistic>(stats_.getStats());
    for (Map.Entry<String, ReplicationStatistics.TimeStatistic> entry : copy.entrySet()) {
      ReplicationStatistics.TimeStatistic stat =
          (ReplicationStatistics.TimeStatistic) entry.getValue();
      if (stat != null) {
        tmp.append("<tr><td>");
        tmp.append(entry.getKey());
        tmp.append("</td><td>");
        tmp.append(stat.replicationCount);
        tmp.append("</td><td>");
        tmp.append(stat.minPassivationTime);
        tmp.append("</td><td>");
        tmp.append(stat.maxPassivationTime);
        tmp.append("</td><td>");
        tmp.append(stat.totalPassivationTime);
        tmp.append("</td><td>");
        tmp.append(stat.minReplicationTime);
        tmp.append("</td><td>");
        tmp.append(stat.maxReplicationTime);
        tmp.append("</td><td>");
        tmp.append(stat.totalReplicationlTime);
        tmp.append("</td><td>");
        tmp.append(stat.loadCount);
        tmp.append("</td><td>");
        tmp.append(stat.minLoadTime);
        tmp.append("</td><td>");
        tmp.append(stat.maxLoadTime);
        tmp.append("</td><td>");
        tmp.append(stat.totalLoadlTime);
        tmp.append("</td></tr>");
      }
    }
    tmp.append("</table>");
    copy.clear();
    return tmp.toString();
  }
Ejemplo n.º 3
0
 /** {@inheritDoc} */
 public String reportReplicationStatisticsCSV() {
   StringBuffer tmp = createCSVHeader();
   Map<String, ReplicationStatistics.TimeStatistic> copy =
       new HashMap<String, ReplicationStatistics.TimeStatistic>(stats_.getStats());
   for (Map.Entry<String, ReplicationStatistics.TimeStatistic> entry : copy.entrySet()) {
     ReplicationStatistics.TimeStatistic stat =
         (ReplicationStatistics.TimeStatistic) entry.getValue();
     if (stat != null) {
       tmp.append("\n");
       tmp.append(entry.getKey());
       tmp.append(",");
       tmp.append(stat.replicationCount);
       tmp.append(",");
       tmp.append(stat.minPassivationTime);
       tmp.append(",");
       tmp.append(stat.maxPassivationTime);
       tmp.append(",");
       tmp.append(stat.totalPassivationTime);
       tmp.append(",");
       tmp.append(stat.minReplicationTime);
       tmp.append(",");
       tmp.append(stat.maxReplicationTime);
       tmp.append(",");
       tmp.append(stat.totalReplicationlTime);
       tmp.append(",");
       tmp.append(stat.loadCount);
       tmp.append(",");
       tmp.append(stat.minLoadTime);
       tmp.append(",");
       tmp.append(stat.maxLoadTime);
       tmp.append(",");
       tmp.append(stat.totalLoadlTime);
     }
   }
   copy.clear();
   return tmp.toString();
 }