use of org.glassfish.external.statistics.impl.ListStatisticImpl in project Payara by payara.
the class JdbcStatsProvider method getfreqUsedSqlQueries.
@ManagedAttribute(id = "frequsedsqlqueries")
public ListStatistic getfreqUsedSqlQueries() {
List<SQLTrace> sqlTraces = freqSqlTraceCache.getTopQueries();
freqUsedSqlQueries = new ListStatisticImpl("frequsedsqlqueries", "List", "Most frequently used sql queries");
for (SQLTrace trace : sqlTraces) {
CountStatisticImpl stat = new CountStatisticImpl(trace.getQueryName(), "Count", "");
stat.setCount(trace.getNumExecutions());
freqUsedSqlQueries.add(stat);
}
return freqUsedSqlQueries;
}
Aggregations