use of javax.management.j2ee.statistics.BoundedRangeStatistic in project Payara by payara.
the class StatsImpl method statToString.
public String statToString() {
StringBuilder sbuf = new StringBuilder();
Statistic[] stats = getStatistics();
int sz = stats.length;
for (int i = 0; i < sz; i++) {
if (stats[i] instanceof CountStatistic) {
CountStatistic stat = (CountStatistic) stats[i];
sbuf.append(stat.getName()).append("=").append(stat.getCount()).append("; ");
} else if (stats[i] instanceof BoundedRangeStatistic) {
BoundedRangeStatistic stat = (BoundedRangeStatistic) stats[i];
sbuf.append(stat.getName()).append("=").append(stat.getCurrent()).append("; ");
} else {
sbuf.append(stats[i].getName()).append("=?");
}
}
return sbuf.toString();
}
Aggregations